diff options
author | Robert S. French <rfrench@mit.edu> | 1987-07-29 11:00:25 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1987-07-29 11:00:25 +0000 |
commit | 587b2749fab3c50f8dd02899302fadb9a5b72974 (patch) | |
tree | 6d3f4527670f849edd267399e82f89f1365c3e9a /lib/ZOpenPort.c | |
parent | f646ff47f8a9a5307d96bf14f7bb57dc4aa0d22c (diff) |
Fixed lossage in opening port 0
Diffstat (limited to 'lib/ZOpenPort.c')
-rw-r--r-- | lib/ZOpenPort.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ZOpenPort.c b/lib/ZOpenPort.c index 9785291..d809c7c 100644 --- a/lib/ZOpenPort.c +++ b/lib/ZOpenPort.c @@ -44,7 +44,7 @@ Code_t ZOpenPort(port) do { if ((retval = bind(__Zephyr_fd,&bindin,sizeof(bindin))) < 0) { if (errno == EADDRINUSE) { - if (port) + if (port && *port) return (ZERR_PORTINUSE); else /*NOSTRICT*/ @@ -55,7 +55,7 @@ Code_t ZOpenPort(port) else return (errno); } - } while (retval < 0 && port); + } while (retval < 0 && (!port || !*port)); __Zephyr_port = bindin.sin_port; __Zephyr_open = 1; |