man/man-db-2.4.3-section.dif

31 lines
733 B
Plaintext
Raw Normal View History

--- src/man.c
+++ src/man.c 2006-06-13 16:01:19.000000000 +0200
@@ -1312,7 +1312,7 @@
{
const char **vs;
- for (vs = section_list; *vs; vs++) {
+ for (vs = section_list; vs && *vs; vs++) {
if (STREQ (*vs, name))
return name;
if (strlen (*vs) == 1 && STRNEQ (*vs, name, 1))
@@ -2714,7 +2714,8 @@
* section_list.
*/
const char **sp;
- for (sp = section_list; *sp; ++sp) {
+
+ for (sp = section_list; sp && *sp; ++sp) {
if (!*(*sp + 1)) {
/* No extension */
if (!sec_left && **sp == *(left->ext))
@@ -3397,7 +3398,7 @@
} else {
const char **sp;
- for (sp = section_list; *sp; sp++) {
+ for (sp = section_list; sp && *sp; sp++) {
char **mp;
for (mp = manpathlist; *mp; mp++)