summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r--src/libsystemd-bus/bus-message.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 538a28af9e..132426f6fd 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -624,18 +624,14 @@ _public_ int sd_bus_message_new_method_errorf(
_cleanup_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
va_list ap;
- int r;
assert_return(name, -EINVAL);
assert_return(m, -EINVAL);
va_start(ap, format);
- r = bus_error_setfv(&error, name, format, ap);
+ bus_error_setfv(&error, name, format, ap);
va_end(ap);
- if (r < 0)
- return r;
-
return sd_bus_message_new_method_error(call, &error, m);
}
@@ -664,15 +660,11 @@ _public_ int sd_bus_message_new_method_errnof(
_cleanup_free_ sd_bus_error berror = SD_BUS_ERROR_NULL;
va_list ap;
- int r;
va_start(ap, format);
- r = bus_error_set_errnofv(&berror, error, format, ap);
+ bus_error_set_errnofv(&berror, error, format, ap);
va_end(ap);
- if (r < 0)
- return r;
-
return sd_bus_message_new_method_error(call, &berror, m);
}