diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-11-23 10:37:31 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-11-23 10:37:31 -0500 |
commit | 5d6325ad816336f13a117f6eac0973372ed821bf (patch) | |
tree | 837edfe348b9a8e1e1663a7c1e5e36825dc50ba0 | |
parent | 15b4b5d63d18da25b9f6f168f27ca38c8fd13cfb (diff) | |
download | expac-5d6325ad816336f13a117f6eac0973372ed821bf.tar.xz |
conf: inline split_keyval
-rw-r--r-- | conf.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -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) { |