diff --git a/tools/kconfig2html.c b/tools/kconfig2html.c index 532522c16e..c5b3f3cbd4 100644 --- a/tools/kconfig2html.c +++ b/tools/kconfig2html.c @@ -1033,16 +1033,16 @@ static inline char *process_config(FILE *stream, const char *configname, char *value; int ndx; - ndx = config.cnselect + 1; - if (ndx > MAX_SELECT) + ndx = config.cnselect; + if (ndx >= MAX_SELECT) { fprintf(stderr, "Too many 'select' lines\n"); exit(ERROR_TOO_MANY_SELECT); } - value = strtok_r(NULL, " ", &g_lasts); + value = strtok_r(NULL, " ", &g_lasts); config.cselect[ndx] = strdup(value); - config.cnselect = ndx; + config.cnselect = ndx + 1; token = NULL; } break; @@ -1100,7 +1100,7 @@ static inline char *process_config(FILE *stream, const char *configname, { /* Print the configuration variable name and the short description */ - body("
CONFIG_%s
",
+ output("CONFIG_%s
",
config.cname, paranum, config.cname);
body("%s ", paranum);
incr_paranum();
@@ -1175,12 +1175,12 @@ static inline char *process_config(FILE *stream, const char *configname,
if (config.cnselect > 0)
{
- body(" %s/Kconfig
\n", kconfigdir);
+ body("