summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-30 17:59:43 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-30 17:59:43 +0200
commit3c6f7c340237262b560586cf7cf06be957d4352f (patch)
tree6eb58f6d2ef4843256139d939dbcbc91da40734c /src/systemctl
parentc6f8d17de0c36f94213496e2c9fd013f113ebe08 (diff)
util-lib: make localed's nonempty() generic, rename it to empty_to_null() and make use of it everywhere
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 58255ae453..e0fde8aa73 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5177,9 +5177,7 @@ static int switch_root(int argc, char *argv[], void *userdata) {
init = cmdline_init;
}
- if (isempty(init))
- init = NULL;
-
+ init = empty_to_null(init);
if (init) {
const char *root_systemd_path = NULL, *root_init_path = NULL;