sd-bus: simplify bus_maybe_reply_error
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 30 Mar 2020 11:49:05 +0000 (13:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Mar 2020 20:19:22 +0000 (22:19 +0200)
commit934cf0a9c7b7f01f5a5aafb03bef4b7b5b0b14c3
tree09069358482d82acf224de4c480a99fadb1a42b1
parentf5d9daaea3dd3f8eaef8b7f5b5a712c6476b05d7
sd-bus: simplify bus_maybe_reply_error

sd_bus_reply_method_errno already does the same two checks
(sd_bus_error_is_set(error), r < 0) internally. But it did them in opposite
order. The effect is the same, because sd_bus_reply_method_errno falls back to
sd_bus_reply_method_error, but it seems inelegant. So let's simplify
bus_maybe_reply_error() to offload the job fully to sd_bus_reply_method_errno().

No functional change.
src/libsystemd/sd-bus/bus-internal.c