sd-bus: drop unnecessary check
errno_name_no_fallback() (and errno_to_name() before that) already handle negative errnos properly.
This commit is contained in:
@@ -165,9 +165,6 @@ static int errno_to_bus_error_name_new(int error, char **ret) {
|
||||
const char *name;
|
||||
char *n;
|
||||
|
||||
if (error < 0)
|
||||
error = -error;
|
||||
|
||||
/* D-Bus names must not start with a digit. Thus, an name like System.Error.500 would not be legal.
|
||||
* Let's just return 0 if an unknown errno is encountered, which will cause the caller to fall back
|
||||
* to BUS_ERROR_FAILED.
|
||||
|
||||
Reference in New Issue
Block a user