networkd: sd_bus_path_decode() returns 0, if the prefix doesn't match
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Jan 2016 17:36:52 +0000 (18:36 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Jan 2016 20:56:54 +0000 (21:56 +0100)
src/network/networkd-link-bus.c

index 8a32aea..4d6ac74 100644 (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);