mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Fix Coverity CID 87570: Unchecked return value from setsockopt()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
a7353678a3
commit
ccdab464c3
1 file changed
+2
-1
@@ -87,7 +87,8 @@ static void spawn_socket(uev_ctx_t *ctx, svc_t *svc)
|
||||
int opt = 1;
|
||||
|
||||
/* Set extra sockopt to get ifindex from inbound packets */
|
||||
setsockopt(sd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt));
|
||||
if (-1 == setsockopt(sd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt)))
|
||||
_pe("Failed enabling IP_PKTINFO on socket");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user