summaryrefslogtreecommitdiff
path: root/src/sysv-generator
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
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/sysv-generator')
-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)