Pārlūkot izejas kodu

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

Stéphane Raimbault 8 gadi atpakaļ
vecāks
revīzija
f43066a157
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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);
     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);
     signal(SIGINT, close_sigint);