From 2c8deb46a0f8da453f53e167a2e90f83fb50fd4c Mon Sep 17 00:00:00 2001 From: "Robert S. French" Date: Thu, 25 Jun 1987 23:35:02 +0000 Subject: safety --- lib/ZOpenPort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ZOpenPort.c') diff --git a/lib/ZOpenPort.c b/lib/ZOpenPort.c index 46ae4af..9374b78 100644 --- a/lib/ZOpenPort.c +++ b/lib/ZOpenPort.c @@ -33,7 +33,7 @@ Code_t ZOpenPort(port) bindin.sin_family = AF_INET; if (port && *port) - bindin.sin_port = htons(*port); + bindin.sin_port = *port; else bindin.sin_port = htons(((getpid()*8)&0xfff)+ ((random()>>4)&0xf)+1024); @@ -55,11 +55,11 @@ Code_t ZOpenPort(port) } } while (retval < 0 && port); - __Zephyr_port = ntohs(bindin.sin_port); + __Zephyr_port = bindin.sin_port; __Zephyr_open = 1; if (port) - *port = ntohs(bindin.sin_port); + *port = bindin.sin_port; return (ZERR_NONE); } -- cgit v1.2.3