From: Коренберг Марк Date: Thu, 30 Aug 2012 14:59:38 +0000 (+0600) Subject: Address comparison bug fixed X-Git-Tag: libnl3_2_13~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00261259f02b41b0689c87525fd5b6039b651c37;p=libnl Address comparison bug fixed Bug introduced in 794ac78c5618ee81a45e4f58694ee27b3403ebd7 --- diff --git a/lib/addr.c b/lib/addr.c index 6150d75..1f1478a 100644 --- a/lib/addr.c +++ b/lib/addr.c @@ -497,11 +497,12 @@ int nl_addr_cmp(struct nl_addr *a, struct nl_addr *b) if (d == 0) { d = a->a_len - b->a_len; - if (a->a_len && d == 0) + if (a->a_len && d == 0) { d = memcmp(a->a_addr, b->a_addr, a->a_len); if (d == 0) return (a->a_prefixlen - b->a_prefixlen); + } } return d;