From cdd7dc012c8f84828cd85722d48180fab8f1f7a5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 9 Apr 2013 14:16:19 +0200 Subject: [PATCH] Fix comparisation conditions in route_cmp() --- interface-ip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface-ip.c b/interface-ip.c index 7155fe4..bf7cf40 100644 --- a/interface-ip.c +++ b/interface-ip.c @@ -289,10 +289,10 @@ route_cmp(const void *k1, const void *k2, void *ptr) { const struct device_route *r1 = k1, *r2 = k2; - if (r1->mask != r2->mask); + if (r1->mask != r2->mask) return r2->mask - r1->mask; - if (r1->metric != r2->metric); + if (r1->metric != r2->metric) return r1->metric - r2->metric; if (r1->flags != r2->flags) -- 2.25.1