File man-db-2.6.3-section.dif of Package man (Revision 9bcefd9d4b7c4719cfd582d1e35199d7)
Currently displaying revision 9bcefd9d4b7c4719cfd582d1e35199d7 , Show latest
xxxxxxxxxx
1
---
2
src/man.c | 8 ++++----
3
1 file changed, 4 insertions(+), 4 deletions(-)
4
5
--- src/man.c
6
+++ src/man.c 2016-12-15 13:49:52.184819971 +0000
7
8
{
9
const char **vs;
10
11
- for (vs = section_list; *vs; vs++) {
12
+ for (vs = section_list; vs && *vs; vs++) {
13
if (STREQ (*vs, name))
14
return name;
15
/* allow e.g. 3perl but disallow 8139too and libfoo */
16
17
/* Find out whether lsource->ext is ahead of rsource->ext in
18
* section_list.
19
*/
20
- for (sp = section_list; *sp; ++sp) {
21
+ for (sp = section_list; sp && *sp; ++sp) {
22
if (!*(*sp + 1)) {
23
/* No extension */
24
if (!sec_left && **sp == *(lsource->ext))
25
26
} else
27
my_section_list = section_list;
28
29
- for (sp = my_section_list; *sp; sp++)
30
+ for (sp = my_section_list; sp && *sp; sp++)
31
for (mp = manpathlist; *mp; mp++)
32
*found += do_global_apropos_section (*mp, *sp, name);
33
34
35
else {
36
const char **sp;
37
38
- for (sp = section_list; *sp; sp++) {
39
+ for (sp = section_list; sp && *sp; sp++) {
40
locate_page_in_manpath (*sp, name, &candidates, found);
41
}
42
}
43