aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-12-19 16:33:39 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-12-19 16:33:39 +0200
commit2a69cacdfe3f43c61c65ea4359c821236b7f141c (patch)
tree00077d82f43deb945c1300dce01fcff9ad2903bf
parentc0550627923463a74e71d6be596a13ac41f9a7b3 (diff)
downloadeclat-2a69cacdfe3f43c61c65ea4359c821236b7f141c.tar.gz
eclat-2a69cacdfe3f43c61c65ea4359c821236b7f141c.tar.bz2
sg: accept port 0
-rw-r--r--src/sg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sg.c b/src/sg.c
index 094798e..2fc0a9b 100644
--- a/src/sg.c
+++ b/src/sg.c
@@ -152,7 +152,7 @@ str2port(const char *str, char **pbuf, size_t *psize)
die(EX_USAGE, "%s: invalid port: %s", str, strerror(errno));
if (*end)
die(EX_USAGE, "%s: invalid port", str);
- if (n == 0 || n > USHRT_MAX)
+ if (n > USHRT_MAX)
die(EX_USAGE, "%s: port number out of range", str);
return (char *) str;
}

Return to:

Send suggestions and report system problems to the System administrator.