mirror of
https://github.com/troglobit/finit.git
synced 2026-10-07 00:00:23 +07:00
inet_dgram_drop(): Fix control flow logic, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+3
-2
@@ -76,14 +76,15 @@ static void inetd_dgram_drop(int sd, const char *ifname)
|
||||
char pkt_interface[17];
|
||||
char buf[BUFSIZ];
|
||||
|
||||
do {
|
||||
while (1) {
|
||||
inetd_dgram_peek(sd, pkt_interface);
|
||||
if (string_compare(pkt_interface, ifname)) {
|
||||
if (recv(sd, buf, sizeof(buf), 0) < 0)
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
} while (0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Peek into SOCK_STREAM on accepted client socket to figure out inbound interface */
|
||||
|
||||
Reference in New Issue
Block a user