From 47bdd9425177dd5f80b43ba10372ca1750df4ac2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 30 Apr 2014 13:45:39 +0200 Subject: netsniff-ng: Use while() instead of empty for Instead of using a foor loop with empty initialization and afterthought, just use a while loop with the same condition. Signed-off-by: Tobias Klauser --- netsniff-ng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'netsniff-ng.c') diff --git a/netsniff-ng.c b/netsniff-ng.c index a994299..b345b22 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -424,8 +424,8 @@ static void receive_to_xmit(struct ctx *ctx) hdr_out = tx_ring.frames[it_out].iov_base; out = ((uint8_t *) hdr_out) + TPACKET2_HDRLEN - sizeof(struct sockaddr_ll); - for (; !user_may_pull_from_tx(tx_ring.frames[it_out].iov_base) && - likely(!sigint);) { + while (!user_may_pull_from_tx(tx_ring.frames[it_out].iov_base) && + likely(!sigint)) { if (ctx->randomize) next_rnd_slot(&it_out, &tx_ring); else { -- cgit v1.2.3-54-g00ecf