Explorar o código

Fix CID 69140 - Bad bit shift operation (coverity) in tests

Stéphane Raimbault %!s(int64=8) %!d(string=hai) anos
pai
achega
f43066a157
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      tests/bandwidth-server-many-up.c

+ 5 - 0
tests/bandwidth-server-many-up.c

@@ -62,6 +62,11 @@ int main(void)
     }
 
     server_socket = modbus_tcp_listen(ctx, NB_CONNECTION);
+    if (server_socket == -1) {
+        fprintf(stderr, "Unable to listen TCP connection\n");
+        modbus_free(ctx);
+        return -1;
+    }
 
     signal(SIGINT, close_sigint);