From 3c6f7c340237262b560586cf7cf06be957d4352f Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 30 May 2016 17:59:43 +0200
Subject: util-lib: make localed's nonempty() generic, rename it to
 empty_to_null() and make use of it everywhere

---
 src/systemctl/systemctl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'src/systemctl')

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;
 
-- 
cgit v1.2.3-54-g00ecf