From 9a354ee972afd10536d4694ad49ebcbb52f8b96c Mon Sep 17 00:00:00 2001 From: bol-van Date: Wed, 26 May 2021 09:26:39 +0300 Subject: [PATCH] nfqws: cosmetic --- nfq/nfqws.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index 5d98613..2a37ee3 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -257,7 +257,7 @@ static int nfq_main() goto exiterr; do { - while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0) + while ((rv = recv(fd, buf, sizeof(buf), 0)) > 0) { dohup(); int r = nfq_handle_packet(h, buf, rv); @@ -268,7 +268,7 @@ static int nfq_main() // do not fail on ENOBUFS } while(errno==ENOBUFS); - printf("unbinding from queue 0\n"); + printf("unbinding from queue %u\n", params.qnum); nfq_destroy_queue(qh); #ifdef INSANE @@ -431,7 +431,7 @@ exiterr: -static bool parse_scale_factor(char *s, uint16_t *wsize, uint8_t *wscale) +static bool parse_ws_scale_factor(char *s, uint16_t *wsize, uint8_t *wscale) { int v; char *p; @@ -660,11 +660,11 @@ int main(int argc, char **argv) } break; case 6: /* wsize */ - if (!parse_scale_factor(optarg,¶ms.wsize,¶ms.wscale)) + if (!parse_ws_scale_factor(optarg,¶ms.wsize,¶ms.wscale)) exit_clean(1); break; case 7: /* wssize */ - if (!parse_scale_factor(optarg,¶ms.wssize,¶ms.wsscale)) + if (!parse_ws_scale_factor(optarg,¶ms.wssize,¶ms.wsscale)) exit_clean(1); break; case 8: /* wssize-cutoff */