summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2006-09-27 16:25:17 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:27 -0700
commitf2fb7f11c1dc0cf66f290671f4a7b427e63da64c (patch)
treebbb0d3bbec8e951f53fe4e1a52b73c80e196ba0f /net
parent521a3b74333140bd33357ea1afe1b514f2c2e771 (diff)
PKT_SCHED: cls_basic: Use unsigned int when generating handle
gcc-4.1 and later take advantage of the fact that in the C language certain types of overflow/underflow are undefined, and this is completely legitimate. Prevents filters from being added if the first generated handle already exists. Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/sched/cls_basic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 86cac49a0531..09fda68c8b39 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -194,7 +194,7 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
if (handle)
f->handle = handle;
else {
- int i = 0x80000000;
+ unsigned int i = 0x80000000;
do {
if (++head->hgenerator == 0x7FFFFFFF)
head->hgenerator = 1;