tree-wide: don't needlessly negate error number passed to bus_error_message()
Like it's customary in our codebase bus_error_message() internally takes abs() of the passed error anyway, hence no need to explicitly negate it. We mostly got this right, but in too many cases we didn't. Fix that.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
ad0b610b0c
commit
2a03b9ed21
@@ -115,7 +115,7 @@ static int change_runlevel(Server *s, int runlevel) {
|
||||
NULL,
|
||||
"ss", target, mode);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to change runlevel: %s", bus_error_message(&error, -r));
|
||||
return log_error_errno(r, "Failed to change runlevel: %s", bus_error_message(&error, r));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user