tevent: Fix CID 1414792 Unchecked return value
authorVolker Lendecke <vl@samba.org>
Tue, 10 Apr 2018 18:58:11 +0000 (20:58 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 11 Apr 2018 17:07:24 +0000 (19:07 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/testsuite.c

index e50845215407240b4ce6c684da01a373b04dd1ed..63abbf2dc1a66af9f6f7cd3b146671b186e45ccc 100644 (file)
@@ -375,6 +375,7 @@ static bool test_event_fd1(struct torture_context *tctx,
                           const void *test_data)
 {
        struct test_event_fd1_state state;
+       int ret;
 
        ZERO_STRUCT(state);
        state.tctx = tctx;
@@ -415,7 +416,9 @@ static bool test_event_fd1(struct torture_context *tctx,
         */
        state.sock[0] = -1;
        state.sock[1] = -1;
-       socketpair(AF_UNIX, SOCK_STREAM, 0, state.sock);
+
+       ret = socketpair(AF_UNIX, SOCK_STREAM, 0, state.sock);
+       torture_assert(tctx, ret == 0, "socketpair() failed");
 
        state.te = tevent_add_timer(state.ev, state.ev,
                                    timeval_current_ofs(0,1000),