Ver código fonte

removed check for positive ports

we have an ulong, so it could not be negative and 0 is not a problem in the following code
Holger Jeromin 9 anos atrás
pai
commit
c035c1f539
1 arquivos alterados com 0 adições e 1 exclusões
  1. 0 1
      examples/networklayer_tcp.c

+ 0 - 1
examples/networklayer_tcp.c

@@ -502,7 +502,6 @@ ClientNetworkLayerTCP_connect(UA_ConnectionConfig localConf, char *endpointUrl,
             unsigned long int tempulong = strtoul(&endpointUrl[portpos+1], &endPtr, 10);
             if (ERANGE != errno &&
                 tempulong < UINT16_MAX &&
-                tempulong > 0 &&
                 endPtr != &endpointUrl[portpos+1])
             {
                 port = (UA_UInt16)tempulong;