From: Volker Lendecke Date: Tue, 10 Apr 2018 18:58:11 +0000 (+0200) Subject: tevent: Fix CID 1414792 Unchecked return value X-Git-Tag: ldb-1.4.0~653 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95c81fe5dc4c4722369e954e844e2bede32c4a89;p=thirdparty%2Fsamba.git tevent: Fix CID 1414792 Unchecked return value Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c index e5084521540..63abbf2dc1a 100644 --- a/lib/tevent/testsuite.c +++ b/lib/tevent/testsuite.c @@ -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),