init: fix compile-time error; fix exiting on broken config file

parse_config: cosmetics
This commit is contained in:
Denis Vlasenko
2008-07-17 17:58:44 +00:00
parent 02a1c6a7c3
commit a474b68991
2 changed files with 21 additions and 25 deletions

View File

@@ -56,16 +56,16 @@ void FAST_FUNC config_close(parser_t *parser)
fclose(parser->fp);
}
int FAST_FUNC config_read(parser_t *parser, char **tokens, int ntokens, int mintokens, const char*delims,char comment)
int FAST_FUNC config_read(parser_t *parser, char **tokens, int ntokens, int mintokens, const char *delims, char comment)
{
char *line, *q;
int ii, seen;
/* do not treat subsequent delimiters as one delimiter */
/* do not treat consecutive delimiters as one delimiter */
bool noreduce = (ntokens < 0);
if (noreduce)
ntokens = -ntokens;
memset(tokens, 0, sizeof(void *) * ntokens);
memset(tokens, 0, sizeof(tokens[0]) * ntokens);
config_free_data(parser);
while (1) {