mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
man: ignore (not complain) lines with less than 2 tokens
in config file
This commit is contained in:
parent
5e40070d38
commit
8895c2073e
@ -106,7 +106,9 @@ int man_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
if (parser) {
|
if (parser) {
|
||||||
/* go through man configuration file and search relevant paths, sections */
|
/* go through man configuration file and search relevant paths, sections */
|
||||||
char *token[2];
|
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) {
|
if (strcmp("MANPATH", token[0]) == 0) {
|
||||||
man_path_list[count_mp] = xstrdup(token[1]);
|
man_path_list[count_mp] = xstrdup(token[1]);
|
||||||
count_mp++;
|
count_mp++;
|
||||||
|
Loading…
Reference in New Issue
Block a user