[netfilter-cvslog] r7365 - in trunk/conntrack-tools: . src

pablo at netfilter.org pablo at netfilter.org
Thu Feb 14 15:21:47 CET 2008


Author: pablo at netfilter.org
Date: 2008-02-14 15:21:46 +0100 (Thu, 14 Feb 2008)
New Revision: 7365

Modified:
   trunk/conntrack-tools/ChangeLog
   trunk/conntrack-tools/src/alarm.c
Log:
From: Max Kellermann <max at duempel.org>
use "for" loop instead of "while"


Modified: trunk/conntrack-tools/ChangeLog
===================================================================
--- trunk/conntrack-tools/ChangeLog	2008-02-14 14:19:56 UTC (rev 7364)
+++ trunk/conntrack-tools/ChangeLog	2008-02-14 14:21:46 UTC (rev 7365)
@@ -99,7 +99,7 @@
 o check if the received packet is large enough
 o introduce alarm_pending()
 o cleanup: use size_t instead of integer
-o cleanup: remove unrequired initialization in the rbtree-based alarm
+o several cleanups in the rbtree-based alarm
 
 version 0.9.5 (2007/07/29)
 ------------------------------

Modified: trunk/conntrack-tools/src/alarm.c
===================================================================
--- trunk/conntrack-tools/src/alarm.c	2008-02-14 14:19:56 UTC (rev 7364)
+++ trunk/conntrack-tools/src/alarm.c	2008-02-14 14:21:46 UTC (rev 7365)
@@ -128,15 +128,12 @@
 
 	gettimeofday(&tv, NULL);
 
-	node = rb_first(&alarm_root);
-	while (node) {
+	for (node = rb_first(&alarm_root); node; node = rb_next(node)) {
 		this = container_of(node, struct alarm_block, node);
 
 		if (timercmp(&this->tv, &tv, >))
 			break;
 
-		node = rb_next(node);
-
 		list_add(&this->list, &alarm_run_queue);
 	}
 




More information about the netfilter-cvslog mailing list