summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-10 16:04:16 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-10 16:23:46 +0200
commit90937fe3d31b433a1794d181a4e028d3817c258d (patch)
treec1d4662bedb83406b6a60cba59219224bf9e73b9 /src
parentbd550f78eb261c757cbff85acdb55563c56521f2 (diff)
tmpfiles: eat up empty columns
Diffstat (limited to 'src')
-rw-r--r--src/tmpfiles/tmpfiles.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 7b649fed23..dc8254cdea 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1860,7 +1860,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
i.path = p;
}
- if (user && !streq(user, "-")) {
+ if (!isempty(user) && !streq(user, "-")) {
const char *u = user;
r = get_user_creds(&u, &i.uid, NULL, NULL, NULL);
@@ -1872,7 +1872,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
i.uid_set = true;
}
- if (group && !streq(group, "-")) {
+ if (!isempty(group) && !streq(group, "-")) {
const char *g = group;
r = get_group_creds(&g, &i.gid);
@@ -1884,7 +1884,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
i.gid_set = true;
}
- if (mode && !streq(mode, "-")) {
+ if (!isempty(mode) && !streq(mode, "-")) {
const char *mm = mode;
unsigned m;
@@ -1904,7 +1904,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
i.mode = IN_SET(i.type, CREATE_DIRECTORY, CREATE_SUBVOLUME, TRUNCATE_DIRECTORY)
? 0755 : 0644;
- if (age && !streq(age, "-")) {
+ if (!isempty(age) && !streq(age, "-")) {
const char *a = age;
if (*a == '~') {