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 <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
* 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;