summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-11-23 10:37:31 -0500
committerDave Reisner <dreisner@archlinux.org>2014-11-23 10:37:31 -0500
commit5d6325ad816336f13a117f6eac0973372ed821bf (patch)
tree837edfe348b9a8e1e1663a7c1e5e36825dc50ba0
parent15b4b5d63d18da25b9f6f168f27ca38c8fd13cfb (diff)
downloadexpac-5d6325ad816336f13a117f6eac0973372ed821bf.tar.xz
conf: inline split_keyval
-rw-r--r--conf.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/conf.c b/conf.c
index 976927b..96e4d60 100644
--- a/conf.c
+++ b/conf.c
@@ -95,12 +95,6 @@ static int parse_include(config_t *config, const char *include, char **section)
return r;
}
-static char *split_keyval(char *line, const char *sep)
-{
- strsep(&line, sep);
- return line;
-}
-
static int parse_one_file(config_t *config, const char *filename, char **section)
{
_cleanup_(fclosep) FILE *fp = NULL;
@@ -157,9 +151,9 @@ static int parse_one_file(config_t *config, const char *filename, char **section
}
if(in_options && memchr(line, '=', len)) {
- char *val;
+ char *val = line;
- val = split_keyval(line, "=");
+ strsep(&val, "=");
strtrim(line);
if(strcmp(line, "Include") == 0) {