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:
parent
d490188b8f
commit
fef805b9fa
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user