summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-register.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-08-07 10:14:30 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-08-07 10:14:33 +0900
commit4ae25393f37b96b2b753562a349d68947ab1ad3d (patch)
tree3ca5d2f931b2ab4760f70a218b5eb704f8a1445a /src/nspawn/nspawn-register.c
parent906119c04632224c7c0d46671eb3f1dd303cacbf (diff)
downloadsystemd-4ae25393f37b96b2b753562a349d68947ab1ad3d.tar.gz
tree-wide: shorten error logging a bit
Continuation of 4027f96aa08c73f109aa46b89842ca0e25c9c0e9.
Diffstat (limited to 'src/nspawn/nspawn-register.c')
-rw-r--r--src/nspawn/nspawn-register.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/nspawn/nspawn-register.c b/src/nspawn/nspawn-register.c
index 93185ecaaa..85f3cf1c01 100644
--- a/src/nspawn/nspawn-register.c
+++ b/src/nspawn/nspawn-register.c
@@ -195,10 +195,8 @@ int register_machine(
r = sd_bus_call(bus, m, 0, &error, NULL);
}
- if (r < 0) {
- log_error("Failed to register machine: %s", bus_error_message(&error, r));
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to register machine: %s", bus_error_message(&error, r));
return 0;
}
@@ -242,10 +240,8 @@ int terminate_machine(sd_bus *bus, pid_t pid) {
&error,
NULL,
NULL);
- if (r < 0) {
+ if (r < 0)
log_debug("Failed to terminate machine: %s", bus_error_message(&error, r));
- return 0;
- }
return 0;
}
@@ -336,10 +332,8 @@ int allocate_scope(
return bus_log_create_error(r);
r = sd_bus_call(bus, m, 0, &error, &reply);
- if (r < 0) {
- log_error("Failed to allocate scope: %s", bus_error_message(&error, r));
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to allocate scope: %s", bus_error_message(&error, r));
r = sd_bus_message_read(reply, "o", &object);
if (r < 0)