Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/makemandb CID 1341551: Don't bother formatting if t...



details:   https://anonhg.NetBSD.org/src/rev/07a752494250
branches:  trunk
changeset: 342040:07a752494250
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 03 21:01:50 2015 +0000

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

diffstat:

 usr.sbin/makemandb/apropos-utils.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 97f94d7fd734 -r 07a752494250 usr.sbin/makemandb/apropos-utils.c
--- a/usr.sbin/makemandb/apropos-utils.c        Thu Dec 03 20:58:08 2015 +0000
+++ b/usr.sbin/makemandb/apropos-utils.c        Thu Dec 03 21:01:50 2015 +0000
@@ -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.upadhyay%gmail.com@localhost>
  * 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 @@
        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);



Home | Main Index | Thread Index | Old Index