Commit f43066a15758f146dd2782ff1da1a3eb83558684
1 parent
2c2fc6d6
Fix CID 69140 - Bad bit shift operation (coverity) in tests
Showing
1 changed file
with
5 additions
and
0 deletions
tests/bandwidth-server-many-up.c
| ... | ... | @@ -62,6 +62,11 @@ int main(void) |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | server_socket = modbus_tcp_listen(ctx, NB_CONNECTION); |
| 65 | + if (server_socket == -1) { | |
| 66 | + fprintf(stderr, "Unable to listen TCP connection\n"); | |
| 67 | + modbus_free(ctx); | |
| 68 | + return -1; | |
| 69 | + } | |
| 65 | 70 | |
| 66 | 71 | signal(SIGINT, close_sigint); |
| 67 | 72 | ... | ... |