summaryrefslogtreecommitdiffstats
path: root/src/sysv-generator/sysv-generator.c
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/sysv-generator/sysv-generator.c
parentnetworkd: bridge add support to configure VLAN filtering (#3344) (diff)
downloadsystemd-3c6f7c340237262b560586cf7cf06be957d4352f.tar.xz
systemd-3c6f7c340237262b560586cf7cf06be957d4352f.zip
util-lib: make localed's nonempty() generic, rename it to empty_to_null() and make use of it everywhere
Diffstat (limited to 'src/sysv-generator/sysv-generator.c')
-rw-r--r--src/sysv-generator/sysv-generator.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index fe4bbeeb75..6a90ca562b 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -527,9 +527,7 @@ static int load_sysv(SysvStub *s) {
t[k-1] = 0;
}
- j = strstrip(t+12);
- if (isempty(j))
- j = NULL;
+ j = empty_to_null(strstrip(t+12));
r = free_and_strdup(&chkconfig_description, j);
if (r < 0)
@@ -605,9 +603,7 @@ static int load_sysv(SysvStub *s) {
state = LSB_DESCRIPTION;
- j = strstrip(t+12);
- if (isempty(j))
- j = NULL;
+ j = empty_to_null(strstrip(t+12));
r = free_and_strdup(&long_description, j);
if (r < 0)
@@ -618,9 +614,7 @@ static int load_sysv(SysvStub *s) {
state = LSB;
- j = strstrip(t+18);
- if (isempty(j))
- j = NULL;
+ j = empty_to_null(strstrip(t+18));
r = free_and_strdup(&short_description, j);
if (r < 0)