Ver Fonte

[PKT_SCHED] cls_basic: Use unsigned int when generating handle

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>
Kim Nordlund há 18 anos atrás
pai
commit
658270a0a4
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      net/sched/cls_basic.c

+ 1 - 1
net/sched/cls_basic.c

@@ -194,7 +194,7 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
 	if (handle)
 	if (handle)
 		f->handle = handle;
 		f->handle = handle;
 	else {
 	else {
-		int i = 0x80000000;
+		unsigned int i = 0x80000000;
 		do {
 		do {
 			if (++head->hgenerator == 0x7FFFFFFF)
 			if (++head->hgenerator == 0x7FFFFFFF)
 				head->hgenerator = 1;
 				head->hgenerator = 1;