summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-17 19:27:58 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-09-17 19:27:58 +0200
commit314ed4f9948bb73300862935546a63294bba1d5c (patch)
tree1cf8f67583dc9065fff7f8b064cce446b9300aec
parenta811fb8b377268566704514e2b05d1b9cb98e5ac (diff)
downloadsystemd-314ed4f9948bb73300862935546a63294bba1d5c.tar.gz
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.
-rw-r--r--src/network/networkd-routing-policy-rule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c
index 1c2c28b02a..8203f87c9f 100644
--- a/src/network/networkd-routing-policy-rule.c
+++ b/src/network/networkd-routing-policy-rule.c
@@ -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;