[prev in list] [next in list] [prev in thread] [next in thread] 

List:       iptraf-ng
Subject:    [PATCH 11/12] packet_size_breakdown(): change do {} while() construct into while() {}
From:       Vitezslav Samel <vitezslav () samel ! cz>
Date:       2014-06-12 9:40:11
Message-ID: 1402566012-8915-12-git-send-email-vitezslav () samel ! cz
[Download RAW message or body]

Signed-off-by: Vitezslav Samel <vitezslav@samel.cz>
---
 src/pktsize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pktsize.c b/src/pktsize.c
index 9d699b9..2d053a2 100644
--- a/src/pktsize.c
+++ b/src/pktsize.c
@@ -279,7 +279,7 @@ void packet_size_breakdown(char *ifname, time_t facilitytime)
 	if (logging)
 		log_next = now.tv_sec + options.logspan;
 
-	do {
+	while (!exitloop) {
 		gettimeofday(&now, NULL);
 
 		if (now.tv_sec > last_time.tv_sec) {
@@ -343,7 +343,7 @@ void packet_size_breakdown(char *ifname, time_t facilitytime)
 			continue;
 
 		update_size_distrib(&table, pkt.pkt_len);
-	} while (!exitloop);
+	}
 
 	packet_destroy(&pkt);
 
-- 
1.9.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic