summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 72f1e109d7..594be370c6 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -230,8 +230,7 @@ static void manager_print_jobs_in_progress(Manager *m) {
m->jobs_in_progress_iteration++;
if (m->n_running_jobs > 1)
- if (asprintf(&job_of_n, "(%u of %u) ", counter, m->n_running_jobs) < 0)
- job_of_n = NULL;
+ (void) asprintf(&job_of_n, "(%u of %u) ", counter, m->n_running_jobs);
bool have_timeout = job_get_timeout(j, &x) > 0;
@@ -620,9 +619,7 @@ static char** sanitize_environment(char **l) {
NULL);
/* Let's order the environment alphabetically, just to make it pretty */
- strv_sort(l);
-
- return l;
+ return strv_sort(l);
}
int manager_default_environment(Manager *m) {
@@ -3142,10 +3139,8 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
return;
}
- if (asprintf(&message, "U\002%c%s%n", (int) (strlen(u->id) + 1), u->id, &n) < 0) {
- log_oom();
- return;
- }
+ if (asprintf(&message, "U\002%c%s%n", (int) (strlen(u->id) + 1), u->id, &n) < 0)
+ return (void) log_oom();
errno = 0;
if (write(fd, message, n + 1) != n + 1)