diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-07-14 12:24:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-07-20 14:53:15 +0200 |
commit | 00d0fd0619a8651a6fb65c056eddfc87ff8f56ca (patch) | |
tree | b6b529b3624bb9d8f2be6f16f2fa77288ee41486 /src | |
parent | 8d36b53a2d08966a3025bd24e51c154be375a61f (diff) |
conf-parser: minor coding style improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/conf-parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 83be79a4f5..d85ab5441e 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -708,6 +708,7 @@ int config_parse_strv(const char *unit, void *userdata) { char ***sv = data; + int r; assert(filename); assert(lvalue); @@ -721,18 +722,19 @@ int config_parse_strv(const char *unit, * we actually fill in a real empty array here rather * than NULL, since some code wants to know if * something was set at all... */ - empty = strv_new(NULL, NULL); + empty = new0(char*, 1); if (!empty) return log_oom(); strv_free(*sv); *sv = empty; + return 0; } for (;;) { char *word = NULL; - int r; + r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE); if (r == 0) break; |