Hi On Tue, Sep 16, 2014 at 11:53 PM, Philippe De Swert <philippedesw...@gmail.com> wrote: > Hi, > > On 17/09/14 00:49, David Herrmann wrote: >> Hi >> >> On Tue, Sep 16, 2014 at 11:27 PM, <philippedesw...@gmail.com> wrote: >>> From: Philippe De Swert <philippedesw...@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; >> >> Ugh, no, there is something seriously wrong. I looks like there used >> to be a method call just before the "if (r < 0)". Or at least there >> was supposed to be a method call, otherwise this really doesn't make >> any sense. > > Indeed, that's why I put it as a RFC and mentioned that it seems > something is missing ;) > >> I tracked it down to: >> >> commit 29ddb38fea134c6132e4f2dd608e9da3871eaebe >> Author: Lennart Poettering <lenn...@poettering.net> >> Date: Wed Oct 9 02:37:10 2013 +0200 >> >> libsystemd-bus: add lightweight object vtable implementation for >> exposing objects on the bus >> >> >> However, there never seemed to be any method call. I'm putting Lennart >> on CC as I have no idea what that things was supposed to do. He's on >> vacation, though, so it may take a while to resolve. > > Not a problem. My intention was to get some eyes on this that might know > what the intention might have been. So it already has had the result I > wanted.
Ok, I pushed some code that refactors the object-manager implementation. This also drops the dead-code you mentioned, so I think this is solved. Thanks David _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel