DEV: tcploop: permit port 0 to ease handling of default options
This will also be convenient when binding to an IP and no port.
diff --git a/dev/tcploop/tcploop.c b/dev/tcploop/tcploop.c
index ca984f7..1aebb88 100644
--- a/dev/tcploop/tcploop.c
+++ b/dev/tcploop/tcploop.c
@@ -248,7 +248,7 @@
*/
if ((port_str = strrchr(str, ':')) == NULL) {
port = atoi(str);
- if (port <= 0 || port > 65535) {
+ if (port < 0 || port > 65535) {
err->len = snprintf(err->msg, err->size, "Missing/invalid port number: '%s'\n", str);
return -1;
}