Module Name:    src
Committed By:   christos
Date:           Thu Dec  3 21:01:50 UTC 2015

Modified Files:
        src/usr.sbin/makemandb: apropos-utils.c

Log Message:
CID 1341551: Don't bother formatting if ti == NULL


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/makemandb/apropos-utils.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/apropos-utils.c
diff -u src/usr.sbin/makemandb/apropos-utils.c:1.18 src/usr.sbin/makemandb/apropos-utils.c:1.19
--- src/usr.sbin/makemandb/apropos-utils.c:1.18	Mon Nov 23 17:34:00 2015
+++ src/usr.sbin/makemandb/apropos-utils.c	Thu Dec  3 16:01:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: apropos-utils.c,v 1.18 2015/11/23 22:34:00 christos Exp $	*/
+/*	$NetBSD: apropos-utils.c,v 1.19 2015/12/03 21:01:50 christos Exp $	*/
 /*-
  * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com>
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: apropos-utils.c,v 1.18 2015/11/23 22:34:00 christos Exp $");
+__RCSID("$NetBSD: apropos-utils.c,v 1.19 2015/12/03 21:01:50 christos Exp $");
 
 #include <sys/queue.h>
 #include <sys/stat.h>
@@ -910,6 +910,9 @@ term_fix_seq(TERMINAL *ti, const char *s
 	char *res = estrdup(seq);
 	struct nv nv;
 
+	if (ti == NULL)
+	    return res;
+
 	nv.s = res;
 	nv.l = 0;
 	ti_puts(ti, seq, 1, term_putc, &nv);

Reply via email to