Skip to content
  • Thomas Haller's avatar
    core: use NM_CMP_*() macro in route_compare() · 668dc1cd
    Thomas Haller authored
    nm_ip_route_get_prefix() and plen are guint type, hence the following
    is not correct:
    
        plen = nm_ip_route_get_prefix (route1);
        r = plen - nm_ip_route_get_prefix (route2);
        if (r)
             return r > 0 ? 1 : -1;
    
    Use the macro, it gets subtle cases like this right.
    
    Fixes: b32bb36c
    668dc1cd