projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbc4661
)
conf-parser: simplify conf_parse_path()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 4 Jun 2018 12:27:57 +0000
(21:27 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 13 Jun 2018 04:50:35 +0000
(13:50 +0900)
Follow-up for
97651797e83d0548aef9f808657d3518d89e5aee
.
src/shared/conf-parser.c
patch
|
blob
|
history
diff --git
a/src/shared/conf-parser.c
b/src/shared/conf-parser.c
index
29dd1dd
..
4a41b81
100644
(file)
--- a/
src/shared/conf-parser.c
+++ b/
src/shared/conf-parser.c
@@
-716,10
+716,8
@@
int config_parse_path(
assert(rvalue);
assert(data);
- if (isempty(rvalue)) {
- n = NULL;
+ if (isempty(rvalue))
goto finalize;
- }
n = strdup(rvalue);
if (!n)
@@
-730,9
+728,7
@@
int config_parse_path(
return fatal ? -ENOEXEC : 0;
finalize:
- free_and_replace(*s, n);
-
- return 0;
+ return free_and_replace(*s, n);
}
int config_parse_strv(