From 6cd55d6f74a49ebf6532f913f6a9cde3efcd34cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 4 Jun 2020 17:41:18 +0200 Subject: [PATCH] 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. --- src/shared/bus-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.47.3