← Commit list

3c6f3336e

Ron Yorston
Ron Yorston
2019-03-26
SUCCESS Duration: 149s

Subject

man: don't skip default path which appears in config file

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/man.c+5 -1
@@ -209,8 +209,12 @@ static char **add_MANPATH(char **man_path_list, int *count_mp, char *path)
/* Do we already have path? */
path_element = man_path_list;
if (path_element) while (*path_element) {
- if (strcmp(*path_element, path) == 0)
+ if (strcmp(*path_element, path) == 0) {
+ /* Have path but haven't counted it, must be default */
+ if (*count_mp == 0)
+ break;
goto skip;
+ }
path_element++;
}
man_path_list = xrealloc_vector(man_path_list, 4, *count_mp);