[systemd-devel] [PATCH 2/3] [RFC]sd-bus: remove some dead code
David Herrmann
dh.herrmann at gmail.com
Tue Sep 16 14:49:41 PDT 2014
Hi
On Tue, Sep 16, 2014 at 11:27 PM, <philippedeswert at gmail.com> wrote:
> 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;
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.
I tracked it down to:
commit 29ddb38fea134c6132e4f2dd608e9da3871eaebe
Author: Lennart Poettering <lennart at 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.
Thanks
David
> if (r == 0)
> continue;
>
> --
> 1.8.3.2
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list