From 5d6325ad816336f13a117f6eac0973372ed821bf Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 23 Nov 2014 10:37:31 -0500 Subject: conf: inline split_keyval --- conf.c | 10 ++-------- 1 file 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) { -- cgit v1.2.3-70-g09d2