Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/man Remove unused include and unused constant. Ok fr...



details:   https://anonhg.NetBSD.org/src/rev/f25b06f381db
branches:  trunk
changeset: 345356:f25b06f381db
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Sat May 21 17:21:40 2016 +0000

description:
Remove unused include and unused constant. Ok from christos@.

diffstat:

 usr.bin/man/man.c       |  8 ++++----
 usr.bin/man/pathnames.h |  3 +--
 2 files changed, 5 insertions(+), 6 deletions(-)

diffs (51 lines):

diff -r ce29b9b40321 -r f25b06f381db usr.bin/man/man.c
--- a/usr.bin/man/man.c Sat May 21 17:06:44 2016 +0000
+++ b/usr.bin/man/man.c Sat May 21 17:21:40 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: man.c,v 1.62 2014/08/14 15:31:12 apb Exp $     */
+/*     $NetBSD: man.c,v 1.63 2016/05/21 17:21:40 abhinav Exp $ */
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)man.c      8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.62 2014/08/14 15:31:12 apb Exp $");
+__RCSID("$NetBSD: man.c,v 1.63 2016/05/21 17:21:40 abhinav Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,7 +51,6 @@
 
 #include <ctype.h>
 #include <err.h>
-#include <errno.h>
 #include <fcntl.h>
 #include <fnmatch.h>
 #include <glob.h>
@@ -160,7 +159,8 @@
                        break;
                case 'M':
                case 'P':       /* -P for backward compatibility */
-                       m.manpath = strdup(optarg);
+                       if ((m.manpath = strdup(optarg)) == NULL)
+                               err(EXIT_FAILURE, "malloc failed");
                        break;
                case 'p':
                        m.getpath = 1;
diff -r ce29b9b40321 -r f25b06f381db usr.bin/man/pathnames.h
--- a/usr.bin/man/pathnames.h   Sat May 21 17:06:44 2016 +0000
+++ b/usr.bin/man/pathnames.h   Sat May 21 17:21:40 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pathnames.h,v 1.5 2003/08/07 11:15:11 agc Exp $        */
+/*     $NetBSD: pathnames.h,v 1.6 2016/05/21 17:21:40 abhinav Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,5 +35,4 @@
 
 #define        _PATH_MANCONF   "/etc/man.conf"
 #define        _PATH_PAGER     "/usr/bin/more -s"
-#define        _PATH_WHATIS    "whatis.db"
 #define        TMPFILE         "man.XXXXXX"



Home | Main Index | Thread Index | Old Index