summaryrefslogtreecommitdiff
path: root/lib/ZOpenPort.c
diff options
context:
space:
mode:
authorGravatar Robert S. French <rfrench@mit.edu>1987-06-25 23:35:02 +0000
committerGravatar Robert S. French <rfrench@mit.edu>1987-06-25 23:35:02 +0000
commit2c8deb46a0f8da453f53e167a2e90f83fb50fd4c (patch)
tree05a4de0b5b0062d87d4563d3add5bb39af59d5e0 /lib/ZOpenPort.c
parent6e0a23514dfcd08657ceae8aed4dd05d185acebc (diff)
safety
Diffstat (limited to 'lib/ZOpenPort.c')
-rw-r--r--lib/ZOpenPort.c6
1 files changed, 3 insertions, 3 deletions
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);
}