mirror of
https://github.com/systemd/systemd.git
synced 2025-01-21 22:04:01 +03:00
networkd-routing-policy-rule.c: drop unnecessary check
set_get() already does that.
This commit is contained in:
parent
431a4bc8c0
commit
b87dadcdb2
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user