소스 검색

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

Stéphane Raimbault 8 년 전
부모
커밋
f43066a157
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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);