[systemd-devel] [PATCH 2/3] [RFC]sd-bus: remove some dead code

philippedeswert at gmail.com philippedeswert at gmail.com
Tue Sep 16 14:27:17 PDT 2014


From: Philippe De Swert <philippedeswert at gmail.com>

The r < 0 test has been done before we reach it in the loop, and we returned
out of the function. So this cannot be reached. But it could actually be that
something is missing.
---
 src/libsystemd/sd-bus/bus-objects.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
index 81c840f..48054da 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
@@ -1180,8 +1180,6 @@ static int process_get_managed_objects(
                         if (require_fallback && !c->is_fallback)
                                 continue;
 
-                        if (r < 0)
-                                return r;
                         if (r == 0)
                                 continue;
 
-- 
1.8.3.2



More information about the systemd-devel mailing list