From: Jo-Philipp Wich Date: Tue, 9 Apr 2013 12:16:19 +0000 (+0200) Subject: Fix comparisation conditions in route_cmp() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cdd7dc012c8f84828cd85722d48180fab8f1f7a5;p=oweals%2Fnetifd.git Fix comparisation conditions in route_cmp() --- 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)