summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-12-23 16:35:15 +0100
committerLennart Poettering <lennart@poettering.net>2020-01-06 15:21:33 +0100
commita54654ba700b1fc6f5cc92e88e2c5544fd7ad2fd (patch)
tree59200ea45672e9aac4ef0803bc931c2fbc7a615e /src
parentcore: don't check error parameter of get_name_owner_handler() (diff)
downloadsystemd-a54654ba700b1fc6f5cc92e88e2c5544fd7ad2fd.tar.xz
systemd-a54654ba700b1fc6f5cc92e88e2c5544fd7ad2fd.zip
core: don't check potentially NULL error, it's not gonna work anyway
Diffstat (limited to 'src')
-rw-r--r--src/core/unit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index c54abe9385..7ea0e8adc9 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3219,11 +3219,10 @@ static int get_name_owner_handler(sd_bus_message *message, void *userdata, sd_bu
u->get_name_owner_slot = sd_bus_slot_unref(u->get_name_owner_slot);
e = sd_bus_message_get_error(message);
- if (sd_bus_error_has_name(e, "org.freedesktop.DBus.Error.NameHasNoOwner"))
- return 0;
-
if (e) {
- log_error("Unexpected error response from GetNameOwner: %s", e->message);
+ if (!sd_bus_error_has_name(e, "org.freedesktop.DBus.Error.NameHasNoOwner"))
+ log_unit_error(u, "Unexpected error response from GetNameOwner(): %s", e->message);
+
return 0;
}