chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7122731
)
conf-parser: minor coding style improvements
author
Lennart Poettering
<lennart@poettering.net>
Thu, 14 Jul 2016 10:24:59 +0000
(12:24 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000
(10:13 +0200)
src/shared/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index 40b6327a53875f2866b4c4636067a122254aa62e..94b0078df2e71ff0eddc4b2fe880d73d66038ebf 100644
(file)
--- 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;
void *userdata) {
char ***sv = data;
+ int r;
assert(filename);
assert(lvalue);
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... */
* 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;
if (!empty)
return log_oom();
strv_free(*sv);
*sv = empty;
+
return 0;
}
for (;;) {
char *word = NULL;
return 0;
}
for (;;) {
char *word = NULL;
- int r;
+
r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE);
if (r == 0)
break;
r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE);
if (r == 0)
break;