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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
521a3b7433
commit
f2fb7f11c1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user