summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/load-fragment.c3
-rw-r--r--src/core/main.c3
-rw-r--r--src/core/manager.c3
-rw-r--r--src/core/service.c3
-rw-r--r--src/core/transaction.c4
5 files changed, 5 insertions, 11 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 0299fe7603..b695c57da8 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3568,12 +3568,11 @@ int unit_load_fragment(Unit *u) {
if (r < 0)
return r;
- if (u->load_state == UNIT_STUB) {
+ if (u->load_state == UNIT_STUB)
/* Hmm, this didn't work? Then let's get rid
* of the fragment path stored for us, so that
* we don't point to an invalid location. */
u->fragment_path = mfree(u->fragment_path);
- }
}
/* Look for a template */
diff --git a/src/core/main.c b/src/core/main.c
index 091af6a9df..9aaf244e71 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1204,12 +1204,11 @@ static int status_welcome(void) {
"PRETTY_NAME", &pretty_name,
"ANSI_COLOR", &ansi_color,
NULL);
- if (r == -ENOENT) {
+ if (r == -ENOENT)
r = parse_env_file("/usr/lib/os-release", NEWLINE,
"PRETTY_NAME", &pretty_name,
"ANSI_COLOR", &ansi_color,
NULL);
- }
if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read os-release file: %m");
diff --git a/src/core/manager.c b/src/core/manager.c
index cd0513fd69..d918007bb8 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2792,9 +2792,8 @@ static void trim_generator_dir(Manager *m, char **generator) {
if (!*generator)
return;
- if (rmdir(*generator) >= 0) {
+ if (rmdir(*generator) >= 0)
*generator = mfree(*generator);
- }
return;
}
diff --git a/src/core/service.c b/src/core/service.c
index 1cf1fcffdc..e396dbe213 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -695,13 +695,12 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
fprintf(f, "%sStatus Text: %s\n",
prefix, s->status_text);
- if (s->n_fd_store_max > 0) {
+ if (s->n_fd_store_max > 0)
fprintf(f,
"%sFile Descriptor Store Max: %u\n"
"%sFile Descriptor Store Current: %u\n",
prefix, s->n_fd_store_max,
prefix, s->n_fd_store);
- }
}
static int service_load_pid_file(Service *s, bool may_warn) {
diff --git a/src/core/transaction.c b/src/core/transaction.c
index b505297e23..b8f69ec6f3 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -380,12 +380,10 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
"Found dependency on %s/%s",
k->unit->id, job_type_to_string(k->type));
- if (!delete && hashmap_get(tr->jobs, k->unit) &&
- !unit_matters_to_anchor(k->unit, k)) {
+ if (!delete && hashmap_get(tr->jobs, k->unit) && !unit_matters_to_anchor(k->unit, k))
/* Ok, we can drop this one, so let's
* do so. */
delete = k;
- }
/* Check if this in fact was the beginning of
* the cycle */