summaryrefslogtreecommitdiff
path: root/libbb/parse_config.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-19 22:57:00 +0000
committerDenis Vlasenko2008-07-19 22:57:00 +0000
commitdcb3fcb042612bfbb311a488379c65024bafd52b (patch)
treece29b24ad433b8d8a4e0b450ca458bcde69a9a88 /libbb/parse_config.c
parentc29684afd61b841c93517f378aaa1fd7750b038d (diff)
downloadbusybox-dcb3fcb042612bfbb311a488379c65024bafd52b.zip
busybox-dcb3fcb042612bfbb311a488379c65024bafd52b.tar.gz
libbb: config_read() update
Diffstat (limited to 'libbb/parse_config.c')
-rw-r--r--libbb/parse_config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/parse_config.c b/libbb/parse_config.c
index 3945501..8d7c97e 100644
--- a/libbb/parse_config.c
+++ b/libbb/parse_config.c
@@ -75,10 +75,10 @@ static void config_free_data(parser_t *const parser)
{
free(parser->line);
parser->line = NULL;
- USE_FEATURE_PARSE_COPY(
+ if (PARSE_KEEP_COPY) { /* compile-time constant */
free(parser->data);
parser->data = NULL;
- )
+ }
}
void FAST_FUNC config_close(parser_t *parser)
@@ -179,9 +179,9 @@ int FAST_FUNC config_read(parser_t *parser, char **tokens, unsigned flags, const
// store line
parser->line = line = xrealloc(line, ii + 1);
- USE_FEATURE_PARSE_COPY(
+ if (flags & PARSE_KEEP_COPY) {
parser->data = xstrdup(line);
- )
+ }
/* now split line to tokens */
ntokens--; // now it's max allowed token no