diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-15 00:39:55 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-15 00:40:13 +0200 |
commit | a391901eb2184413fa10a37f1635bf2092ac7b8e (patch) | |
tree | 5699235fff4413b4d56092309e6069254687b887 /src/network/networkd-ipv4ll.c | |
parent | network: voidify sd_ipv4acd_stop() at one place (diff) | |
download | systemd-a391901eb2184413fa10a37f1635bf2092ac7b8e.tar.xz systemd-a391901eb2184413fa10a37f1635bf2092ac7b8e.zip |
network: drop unnecessary conditions
sd_ipv4acd_stop() and sd_ipv4ll_stop() are idempotent.
Diffstat (limited to 'src/network/networkd-ipv4ll.c')
-rw-r--r-- | src/network/networkd-ipv4ll.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c index 03f29e3b66..3be395e1ad 100644 --- a/src/network/networkd-ipv4ll.c +++ b/src/network/networkd-ipv4ll.c @@ -207,11 +207,9 @@ int ipv4ll_update_mac(Link *link) { restart = sd_ipv4ll_is_running(link->ipv4ll) > 0; - if (restart) { - r = sd_ipv4ll_stop(link->ipv4ll); - if (r < 0) - return r; - } + r = sd_ipv4ll_stop(link->ipv4ll); + if (r < 0) + return r; r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac); if (r < 0) |