Thread (17 messages) flat view 17 messages, 3 authors, 2004-11-02
STALE7959d

[PATCH 6/6] PKT_SCHED: break is not enough to stop walking

From: Thomas Graf <tgraf@suug.ch>
Date: 2004-10-29 00:26:28

break is not enough to escape from the walking loops, since
multiple encapsulated loops are used to traverse the hash tables.

Signed-off-by: Thomas Graf <tgraf@suug.ch>

diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c linux-2.6.10-rc1-bk7/net/sched/cls_fw.c
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c	2004-10-29 00:43:38.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c	2004-10-29 00:50:29.000000000 +0200
@@ -338,7 +338,7 @@
 			}
 			if (arg->fn(tp, (unsigned long)f, arg) < 0) {
 				arg->stop = 1;
-				break;
+				return;
 			}
 			arg->count++;
 		}
diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c linux-2.6.10-rc1-bk7/net/sched/cls_route.c
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c	2004-10-28 22:03:29.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_route.c	2004-10-29 01:31:12.000000000 +0200
@@ -538,7 +538,7 @@
 					}
 					if (arg->fn(tp, (unsigned long)f, arg) < 0) {
 						arg->stop = 1;
-						break;
+						return;
 					}
 					arg->count++;
 				}
diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h
--- linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h	2004-10-28 22:03:29.000000000 +0200
+++ linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h	2004-10-29 01:31:49.000000000 +0200
@@ -601,7 +601,7 @@
 					}
 					if (arg->fn(tp, (unsigned long)f, arg) < 0) {
 						arg->stop = 1;
-						break;
+						return;
 					}
 					arg->count++;
 				}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help