From 3d8e5be7ac1d25649786f56a2bea1740b34aad98 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 28 Aug 2018 11:25:01 -0400 Subject: [PATCH] Fix: Remove dead code in fd passing function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Found by Coverity: CID 1395190 (#1 of 1): Logically dead code (DEADCODE) dead_error_begin: Execution cannot reach this statement: fprintf(stderr, "Error: Inv... Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau --- src/common/unix.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/common/unix.c b/src/common/unix.c index a87ce05ed..edca02abf 100644 --- a/src/common/unix.c +++ b/src/common/unix.c @@ -490,11 +490,6 @@ ssize_t lttcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd) * message. */ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { - if (!cmsg) { - fprintf(stderr, "Error: Invalid control message header\n"); - ret = -1; - goto end; - } if (cmsg->cmsg_level != SOL_SOCKET) { fprintf(stderr, "Error: The socket needs to be of type SOL_SOCKET\n"); ret = -1; -- 2.34.1