From: Thomas Graf Date: Wed, 8 Jun 2005 22:11:19 +0000 (-0700) Subject: [PKT_SCHED]: Fix numeric comparison in meta ematch X-Git-Tag: v3.12-rc1~43115^2~89^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98e56405521b74b4826f855d45ef7859f34548ff;p=kernel%2Fkernel-generic.git [PKT_SCHED]: Fix numeric comparison in meta ematch This patch is brought to you by the department of applied stupidity. Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index ed2a46c..48bb23c 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -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;