summaryrefslogtreecommitdiff
path: root/src/fsck/fsck.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-30 16:13:21 +0100
committerLennart Poettering <lennart@poettering.net>2013-10-30 16:13:43 +0100
commit5220a6f3a1f5a7324898ecfe7649af254cf561a6 (patch)
tree6fc5a0e3652feef9a9c0fd8690c8033802a10a58 /src/fsck/fsck.c
parent36f9f99556b2fd90705a9eda2e8f182b1e63a15e (diff)
general: various cleanups
Diffstat (limited to 'src/fsck/fsck.c')
-rw-r--r--src/fsck/fsck.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 3164d6899c..10c968678b 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -44,8 +44,8 @@ static bool arg_force = false;
static bool arg_show_progress = false;
static void start_target(const char *target) {
- _cleanup_bus_unref_ sd_bus *bus = NULL;
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_bus_unref_ sd_bus *bus = NULL;
int r;
assert(target);
@@ -67,15 +67,10 @@ static void start_target(const char *target) {
&error,
NULL,
"sss", "basic.target", target, "replace");
- if (r < 0) {
-
- /* Don't print a warning if we aren't called during
- * startup */
- if (!sd_bus_error_has_name(&error, BUS_ERROR_NO_SUCH_JOB))
- log_error("Failed to start unit: %s", bus_error_message(&error, -r));
- }
- return;
+ /* Don't print a warning if we aren't called during startup */
+ if (r < 0 && !sd_bus_error_has_name(&error, BUS_ERROR_NO_SUCH_JOB))
+ log_error("Failed to start unit: %s", bus_error_message(&error, -r));
}
static int parse_proc_cmdline(void) {