From f43066a15758f146dd2782ff1da1a3eb83558684 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Wed, 18 May 2016 15:43:30 +0200 Subject: [PATCH] Fix CID 69140 - Bad bit shift operation (coverity) in tests --- tests/bandwidth-server-many-up.c | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/tests/bandwidth-server-many-up.c b/tests/bandwidth-server-many-up.c index 84b59f0..0f00f3a 100644 --- a/tests/bandwidth-server-many-up.c +++ b/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); -- libgit2 0.21.4