]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared/bus-util: fix misleading error handling
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 4 Jun 2020 15:41:18 +0000 (17:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jun 2020 14:32:37 +0000 (16:32 +0200)
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

index a77c736fcb903bc9a557336d964dcb04086c0f77..f64e200731dc42484361f0bca206b1305a90d89f 100644 (file)
@@ -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();
                 }