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:
Zbigniew Jędrzejewski-Szmek
2025-07-29 18:05:54 +02:00
parent 858cb6e49e
commit 9c11175db9
-3
View File
@@ -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.