Module Name:    src
Committed By:   joerg
Date:           Thu Mar 12 14:57:19 UTC 2015

Modified Files:
        src/usr.sbin/makemandb: makemandb.c

Log Message:
MDOC_MAX is a valid token if the type is text. Adjust.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/makemandb/makemandb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.27 src/usr.sbin/makemandb/makemandb.c:1.28
--- src/usr.sbin/makemandb/makemandb.c:1.27	Wed Mar  4 02:02:15 2015
+++ src/usr.sbin/makemandb/makemandb.c	Thu Mar 12 14:57:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.27 2015/03/04 02:02:15 christos Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay <[email protected]>
  * Copyright (c) 2011 Kristaps Dzonsons <[email protected]>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: makemandb.c,v 1.27 2015/03/04 02:02:15 christos Exp $");
+__RCSID("$NetBSD: makemandb.c,v 1.28 2015/03/12 14:57:18 joerg Exp $");
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -981,7 +981,7 @@ pmdoc_Nd(const struct mdoc_node *n, mand
 	char *temp;
 	char *nd_text;
 
-	if (n == NULL || n->tok == MDOC_MAX)
+	if (n == NULL || (n->type != MDOC_TEXT && n->tok == MDOC_MAX))
 		return;
 
 	if (n->type == MDOC_TEXT) {
@@ -1098,7 +1098,7 @@ pmdoc_Pp(const struct mdoc_node *n, mand
 static void
 pmdoc_Sh(const struct mdoc_node *n, mandb_rec *rec)
 {
-	if (n == NULL || n->tok == MDOC_MAX)
+	if (n == NULL || (n->type != MDOC_TEXT && n->tok == MDOC_MAX))
 		return;
 	int xr_found = 0;
 

Reply via email to