Skip to content

Commit

Permalink
[PKT_SCHED]: Fix numeric comparison in meta ematch
Browse files Browse the repository at this point in the history
This patch is brought to you by the department of applied stupidity.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Jun 8, 2005
1 parent e1e284a commit 98e5640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sched/em_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,9 @@ static int meta_int_compare(struct meta_obj *a, struct meta_obj *b)
/* Let gcc optimize it, the unlikely is not really based on
* some numbers but jump free code for mismatches seems
* more logical. */
if (unlikely(a == b))
if (unlikely(a->value == b->value))
return 0;
else if (a < b)
else if (a->value < b->value)
return -1;
else
return 1;
Expand Down

0 comments on commit 98e5640

Please sign in to comment.