summaryrefslogtreecommitdiff
path: root/src/bus-proxyd/bus-proxyd.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 18:23:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 18:24:30 +0100
commit23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 (patch)
tree28e66fb86dd0cffc3a3cca3cf234cb52c3b64ad3 /src/bus-proxyd/bus-proxyd.c
parent5e03c6e3b517286bbd65b48d88f60e5b83721894 (diff)
treewide: more log_*_errno + return simplifications
Diffstat (limited to 'src/bus-proxyd/bus-proxyd.c')
-rw-r--r--src/bus-proxyd/bus-proxyd.c60
1 files changed, 20 insertions, 40 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index d2acb788d3..4f3adf72d1 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -1155,34 +1155,24 @@ static int process_hello(sd_bus *a, sd_bus *b, sd_bus_message *m, bool *got_hell
return 0;
r = sd_bus_message_new_method_return(m, &n);
- if (r < 0) {
- log_error_errno(r, "Failed to generate HELLO reply: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to generate HELLO reply: %m");
r = sd_bus_message_append(n, "s", a->unique_name);
- if (r < 0) {
- log_error_errno(r, "Failed to append unique name to HELLO reply: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to append unique name to HELLO reply: %m");
r = bus_message_append_sender(n, "org.freedesktop.DBus");
- if (r < 0) {
- log_error_errno(r, "Failed to append sender to HELLO reply: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to append sender to HELLO reply: %m");
r = bus_seal_synthetic_message(b, n);
- if (r < 0) {
- log_error_errno(r, "Failed to seal HELLO reply: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to seal HELLO reply: %m");
r = sd_bus_send(b, n, NULL);
- if (r < 0) {
- log_error_errno(r, "Failed to send HELLO reply: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to send HELLO reply: %m");
n = sd_bus_message_unref(n);
r = sd_bus_message_new_signal(
@@ -1191,34 +1181,24 @@ static int process_hello(sd_bus *a, sd_bus *b, sd_bus_message *m, bool *got_hell
"/org/freedesktop/DBus",
"org.freedesktop.DBus",
"NameAcquired");
- if (r < 0) {
- log_error_errno(r, "Failed to allocate initial NameAcquired message: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to allocate initial NameAcquired message: %m");
r = sd_bus_message_append(n, "s", a->unique_name);
- if (r < 0) {
- log_error_errno(r, "Failed to append unique name to NameAcquired message: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to append unique name to NameAcquired message: %m");
r = bus_message_append_sender(n, "org.freedesktop.DBus");
- if (r < 0) {
- log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
r = bus_seal_synthetic_message(b, n);
- if (r < 0) {
- log_error_errno(r, "Failed to seal NameAcquired message: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to seal NameAcquired message: %m");
r = sd_bus_send(b, n, NULL);
- if (r < 0) {
- log_error_errno(r, "Failed to send NameAcquired message: %m");
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to send NameAcquired message: %m");
return 1;
}