summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-07-14 12:24:59 +0200
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:13:01 +0200
commit3ed6597f1cfcf781dc5af1574cf92d3e22ee27ff (patch)
tree2d913d27db8f31ff65c55b3746c7512efe677658 /src/shared
parent71227310a62a616a0d9356fe0506e01f47c76eb3 (diff)
conf-parser: minor coding style improvements
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/conf-parser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 40b6327a5..94b0078df 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -713,6 +713,7 @@ int config_parse_strv(const char *unit,
void *userdata) {
char ***sv = data;
+ int r;
assert(filename);
assert(lvalue);
@@ -726,18 +727,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;