1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

network/netdev: do not assign value on failure

This commit is contained in:
Yu Watanabe 2022-02-17 23:50:07 +09:00
parent d490188b8f
commit fef805b9fa

View File

@ -253,10 +253,8 @@ int netdev_get(Manager *manager, const char *name, NetDev **ret) {
assert(ret);
netdev = hashmap_get(manager->netdevs, name);
if (!netdev) {
*ret = NULL;
if (!netdev)
return -ENOENT;
}
*ret = netdev;