summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-route.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-07-10 02:38:38 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-07-29 15:48:49 +0200
commita3a25d01ced27efb40931935e0069291e36bbe7b (patch)
tree9cc1e206d947fc9e301220b0f0bab2ab2ce3d336 /src/network/networkd-route.c
parentnetwork: use address_remove_and_drop() (diff)
downloadsystemd-a3a25d01ced27efb40931935e0069291e36bbe7b.tar.xz
systemd-a3a25d01ced27efb40931935e0069291e36bbe7b.zip
network: drop unnecessary conditions
When link_get_by_index() succeeds, the result is always non-NULL.
Diffstat (limited to 'src/network/networkd-route.c')
-rw-r--r--src/network/networkd-route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 44dc63b642..283d515b81 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -1719,7 +1719,7 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, Ma
}
r = link_get_by_index(m, ifindex, &link);
- if (r < 0 || !link) {
+ if (r < 0) {
/* when enumerating we might be out of sync, but we will
* get the route again, so just ignore it */
if (!m->enumerating)