Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makemandb If you cannot parse .SH NAME, like in the...
details: https://anonhg.NetBSD.org/src/rev/cf9d59f5f59d
branches: trunk
changeset: 782608:cf9d59f5f59d
user: christos <christos%NetBSD.org@localhost>
date: Thu Nov 08 19:17:54 2012 +0000
description:
If you cannot parse .SH NAME, like in the case of the ksh93 man page
where the .SH is followed by a conditional:
.SH NAME
.if \nZ=0 \{\
text text text
.\}
at least don't core-dump.
diffstat:
usr.sbin/makemandb/makemandb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r b228df2591ed -r cf9d59f5f59d usr.sbin/makemandb/makemandb.c
--- a/usr.sbin/makemandb/makemandb.c Thu Nov 08 18:30:21 2012 +0000
+++ b/usr.sbin/makemandb/makemandb.c Thu Nov 08 19:17:54 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: makemandb.c,v 1.15 2012/10/06 15:33:59 wiz Exp $ */
+/* $NetBSD: makemandb.c,v 1.16 2012/11/08 19:17:54 christos Exp $ */
/*
* Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadhyay%gmail.com@localhost>
* Copyright (c) 2011 Kristaps Dzonsons <kristaps%bsd.lv@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.15 2012/10/06 15:33:59 wiz Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.16 2012/11/08 19:17:54 christos Exp $");
#include <sys/stat.h>
#include <sys/types.h>
@@ -1277,6 +1277,8 @@
pman_parse_name(n, rec);
name_desc = rec->name_desc;
+ if (name_desc == NULL)
+ return;
/* Remove any leading spaces. */
while (name_desc[0] == ' ')
Home |
Main Index |
Thread Index |
Old Index