mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
inet_dgram_drop(): Check return value from recv()
Found by Coverity Scan. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
9e8a01669e
commit
3f731aa5a3
1 file changed
+3
-3
+3
-3
@@ -78,11 +78,11 @@ static void inetd_dgram_drop(int sd, const char *ifname)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
inetd_dgram_peek(sd, pkt_interface);
|
inetd_dgram_peek(sd, pkt_interface);
|
||||||
if(string_compare(pkt_interface, ifname)) {
|
if (string_compare(pkt_interface, ifname)) {
|
||||||
recv(sd, buf, sizeof(buf), 0);
|
if (recv(sd, buf, sizeof(buf), 0) < 0)
|
||||||
|
break;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (0);
|
} while (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user