diff options
author | Denis Vlasenko | 2008-07-26 19:44:53 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-07-26 19:44:53 +0000 |
commit | 8895c2073e9341d8e0348365e75ba6aa4b9b8d05 (patch) | |
tree | 3788240c51caa2703822f49d835cc6bc1dbcb755 /miscutils/man.c | |
parent | 5e40070d38cf02b96da72db5c6612e8971ef65f0 (diff) | |
download | busybox-8895c2073e9341d8e0348365e75ba6aa4b9b8d05.zip busybox-8895c2073e9341d8e0348365e75ba6aa4b9b8d05.tar.gz |
man: ignore (not complain) lines with less than 2 tokens
in config file
Diffstat (limited to 'miscutils/man.c')
-rw-r--r-- | miscutils/man.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/man.c b/miscutils/man.c index df00c3e..7ef5941 100644 --- a/miscutils/man.c +++ b/miscutils/man.c @@ -106,7 +106,9 @@ int man_main(int argc UNUSED_PARAM, char **argv) if (parser) { /* go through man configuration file and search relevant paths, sections */ char *token[2]; - while (config_read(parser, token, 2, 2, "# \t", PARSE_LAST_IS_GREEDY)) { + while (config_read(parser, token, 2, 0, "# \t", PARSE_LAST_IS_GREEDY)) { + if (!token[1]) + continue; if (strcmp("MANPATH", token[0]) == 0) { man_path_list[count_mp] = xstrdup(token[1]); count_mp++; |