diff options
Diffstat (limited to 'src/shared/dbus-common.c')
-rw-r--r-- | src/shared/dbus-common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c index 5afce7627a..b8c15cb9fc 100644 --- a/src/shared/dbus-common.c +++ b/src/shared/dbus-common.c @@ -258,12 +258,11 @@ const char *bus_error_message(const DBusError *error) { return error->message; } -const char *bus_error_message_or_strerror(const DBusError *error, int err) { - +const char *bus_error(const DBusError *error, int err) { if (error && dbus_error_is_set(error)) return bus_error_message(error); - return strerror(err); + return strerror(err < 0 ? -err : err); } DBusHandlerResult bus_default_message_handler( |