aboutsummaryrefslogtreecommitdiff
path: root/libbb/parse_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/parse_config.c')
-rw-r--r--libbb/parse_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/parse_config.c b/libbb/parse_config.c
index e63204b09..f07099285 100644
--- a/libbb/parse_config.c
+++ b/libbb/parse_config.c
@@ -19,7 +19,7 @@ Typical usage:
19 // open file 19 // open file
20 if (config_open(filename, &p)) { 20 if (config_open(filename, &p)) {
21 // parse line-by-line 21 // parse line-by-line
22 while (*config_read(&p, t, 3, 0, delimiters, comment_char)) { // 0..3 tokens 22 while (*config_read(&p, t, 3, 0, delimiters, comment_char) >= 0) { // 0..3 tokens
23 // use tokens 23 // use tokens
24 bb_error_msg("TOKENS: [%s][%s][%s]", t[0], t[1], t[2]); 24 bb_error_msg("TOKENS: [%s][%s][%s]", t[0], t[1], t[2]);
25 } 25 }
@@ -77,7 +77,7 @@ int FAST_FUNC config_read(parser_t *parser, char **tokens, int ntokens, int mint
77//TODO: speed up xmalloc_fgetline by internally using fgets, not fgetc 77//TODO: speed up xmalloc_fgetline by internally using fgets, not fgetc
78 line = xmalloc_fgetline(parser->fp); 78 line = xmalloc_fgetline(parser->fp);
79 if (!line) 79 if (!line)
80 return line; 80 return -1;
81 81
82 parser->lineno++; 82 parser->lineno++;
83 // handle continuations. Tito's code stolen :) 83 // handle continuations. Tito's code stolen :)