]> git.cameronkatri.com Git - mandoc.git/blobdiff - manpath.c
Delete two preprocessor constants that are no longer used.
[mandoc.git] / manpath.c
index 532bdb30a24b351364fb8efdc885d4e2d52718ea..f912e76694bf85061efb8929643aa6b46eb7491c 100644 (file)
--- a/manpath.c
+++ b/manpath.c
@@ -1,4 +1,4 @@
-/*     $Id: manpath.c,v 1.26 2015/06/10 19:26:13 schwarze Exp $        */
+/*     $Id: manpath.c,v 1.27 2015/10/11 21:12:55 schwarze Exp $        */
 /*
  * Copyright (c) 2011, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -21,6 +21,7 @@
 #include <sys/stat.h>
 
 #include <ctype.h>
+#include <err.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -165,10 +166,8 @@ manpath_add(struct manpaths *dirs, const char *dir, int complain)
        size_t           i;
 
        if (NULL == (cp = realpath(dir, buf))) {
-               if (complain) {
-                       fputs("manpath: ", stderr);
-                       perror(dir);
-               }
+               if (complain)
+                       warn("manpath: %s", dir);
                return;
        }
 
@@ -177,10 +176,8 @@ manpath_add(struct manpaths *dirs, const char *dir, int complain)
                        return;
 
        if (stat(cp, &sb) == -1) {
-               if (complain) {
-                       fputs("manpath: ", stderr);
-                       perror(dir);
-               }
+               if (complain)
+                       warn("manpath: %s", dir);
                return;
        }