mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-14 01:57:27 +03:00
networkd: unbreak routing_policy_rule_compare_func()
!r is the same r == 0, so this was short-circuiting the comparison when streq(a->iff, b->iff) or streq(a->off, b->off). Before the parent commit which moved those comparisons to the end, this was short-circuiting quite a bit of the comparison function.
This commit is contained in:
parent
a811fb8b37
commit
314ed4f994
@ -199,11 +199,11 @@ static int routing_policy_rule_compare_func(const RoutingPolicyRule *a, const Ro
|
||||
return r;
|
||||
|
||||
r = strcmp_ptr(a->iif, b->iif);
|
||||
if (!r)
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
r = strcmp_ptr(a->oif, b->oif);
|
||||
if (!r)
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user