diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-03 21:42:38 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-03 21:42:38 +0100 |
commit | 3b43629240c82bf270542dc3ea13868980b30f07 (patch) | |
tree | bf68813b8875a9af5f38282d85bdbfe05a1dfefa /src/shared | |
parent | 94828d2ddc89c9dba3d6f386e55b6c9310d8f627 (diff) |
conf-parser: drop special casing in config_parse_path()
The code checked for two lvalues that aren't even using
config_parse_path(), so let's drop these checks and make the function
completely generic again.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/conf-parser.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index f0bbbc39ac..1ad2b4fcba 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -617,9 +617,7 @@ int config_parse_path(const char *unit, void *data, void *userdata) { - char **s = data; - char *n; - int offset; + char **s = data, *n; assert(filename); assert(lvalue); @@ -627,16 +625,12 @@ int config_parse_path(const char *unit, assert(data); if (!utf8_is_valid(rvalue)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); + log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Path is not UTF-8 clean, ignoring assignment: %s", rvalue); return 0; } - offset = rvalue[0] == '-' && (streq(lvalue, "InaccessibleDirectories") || - streq(lvalue, "ReadOnlyDirectories")); - if (!path_is_absolute(rvalue + offset)) { - log_syntax(unit, LOG_ERR, filename, line, EINVAL, - "Not an absolute path, ignoring: %s", rvalue); + if (!path_is_absolute(rvalue)) { + log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Not an absolute path, ignoring: %s", rvalue); return 0; } |