networkd: sd_bus_path_decode() returns 0, if the prefix doesn't match

This commit is contained in:
Lennart Poettering 2016-01-19 18:36:52 +01:00
parent fdb90ac6a6
commit a7f6e7e847
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
assert(found);
r = sd_bus_path_decode(path, "/org/freedesktop/network1/link", &identifier);
if (r < 0)
if (r <= 0)
return 0;
r = parse_ifindex(identifier, &ifindex);