summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c2
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c2
-rw-r--r--src/network/networkd-link.c2
3 files changed, 1 insertions, 5 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index bfb14fcce6..1fa3ad2611 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -5337,7 +5337,7 @@ int bus_header_message_size(struct bus_header *h, size_t *sum) {
}
_public_ int sd_bus_message_get_errno(sd_bus_message *m) {
- assert_return(m, -EINVAL);
+ assert_return(m, EINVAL);
if (m->header->type != SD_BUS_MESSAGE_METHOD_ERROR)
return 0;
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 33b65aba72..28b993b7ba 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -349,8 +349,6 @@ static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd
assert(reply);
r = sd_bus_message_get_errno(reply);
- if (r < 0)
- return r;
if (r > 0)
return -r;
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 9bf1a811c9..427f6953c5 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -725,8 +725,6 @@ static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata,
return 1;
r = sd_bus_message_get_errno(m);
- if (r < 0)
- r = -r;
if (r > 0)
log_warning_link(link, "Could not set hostname: %s",
strerror(r));