summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-04-30 13:45:39 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-04-30 13:45:39 +0200
commit47bdd9425177dd5f80b43ba10372ca1750df4ac2 (patch)
tree9b6e04eaa0a8d603d27419cfaa047d7f18a69c75 /netsniff-ng.c
parentf4821f92614bafaaee01721b3a5ffc29fe2f5365 (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c4
1 files changed, 2 insertions, 2 deletions
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 {