From b87dadcdb2badcd3f6d570915c09242fc796edfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 27 Sep 2018 17:50:25 +0200 Subject: [PATCH] networkd-routing-policy-rule.c: drop unnecessary check set_get() already does that. --- src/network/networkd-routing-policy-rule.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index 51b817e..bbab393 100644 --- a/src/network/networkd-routing-policy-rule.c +++ b/src/network/networkd-routing-policy-rule.c @@ -177,22 +177,18 @@ int routing_policy_rule_get(Manager *m, .oif = (char*) oif }; - if (m->rules) { - existing = set_get(m->rules, &rule); - if (existing) { - if (ret) - *ret = existing; - return 1; - } + existing = set_get(m->rules, &rule); + if (existing) { + if (ret) + *ret = existing; + return 1; } - if (m->rules_foreign) { - existing = set_get(m->rules_foreign, &rule); - if (existing) { - if (ret) - *ret = existing; - return 1; - } + existing = set_get(m->rules_foreign, &rule); + if (existing) { + if (ret) + *ret = existing; + return 1; } return -ENOENT; -- 2.7.4