common.c: remove always true comparison
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:26:50 +0000 (11:26 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 13 Aug 2019 09:26:50 +0000 (11:26 +0200)
ntohs() returns an uint16_t, which is always less than 65535

src/utils/common/common.c

index 7cfd310..2d961d4 100644 (file)
@@ -1456,13 +1456,13 @@ int service_name_to_port_number(const char *service_name) {
       service_number = (int)ntohs(sa->sin6_port);
     }
 
-    if ((service_number > 0) && (service_number <= 65535))
+    if (service_number > 0)
       break;
   }
 
   freeaddrinfo(ai_list);
 
-  if ((service_number > 0) && (service_number <= 65535))
+  if (service_number > 0)
     return service_number;
   return -1;
 } /* int service_name_to_port_number */