From: Zbigniew Jędrzejewski-Szmek Date: Thu, 4 Jun 2020 15:41:18 +0000 (+0200) Subject: shared/bus-util: fix misleading error handling X-Git-Tag: v246-rc1~105^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6cd55d6f74a49ebf6532f913f6a9cde3efcd34cf;p=thirdparty%2Fsystemd.git shared/bus-util: fix misleading error handling set_put()/set_ensure_put() return 0, not -EEXIST, if the entry is already found in the set. In this case this does not make any difference, but let's not confuse the reader. --- diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index a77c736fcb9..f64e200731d 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -614,7 +614,7 @@ int bus_message_print_all_properties( if (found_properties) { r = set_ensure_put(found_properties, &string_hash_ops, name); - if (r < 0 && r != -EEXIST) + if (r < 0) return log_oom(); }