=================================================================== RCS file: /cvs/mandoc/mandoc_aux.c,v retrieving revision 1.6 retrieving revision 1.9 diff -u -p -r1.6 -r1.9 --- mandoc/mandoc_aux.c 2015/10/11 21:12:54 1.6 +++ mandoc/mandoc_aux.c 2015/11/07 14:22:29 1.9 @@ -1,4 +1,4 @@ -/* $Id: mandoc_aux.c,v 1.6 2015/10/11 21:12:54 schwarze Exp $ */ +/* $Id: mandoc_aux.c,v 1.9 2015/11/07 14:22:29 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -19,7 +19,9 @@ #include +#if HAVE_ERR #include +#endif #include #include #include @@ -28,9 +30,6 @@ #include "mandoc.h" #include "mandoc_aux.h" -#if !HAVE_PROGNAME -const char *mandoc_progname; -#endif int mandoc_asprintf(char **dest, const char *fmt, ...) @@ -95,7 +94,7 @@ mandoc_strdup(const char *ptr) char *p; p = strdup(ptr); - if (ptr == NULL) + if (p == NULL) err((int)MANDOCLEVEL_SYSERR, NULL); return p; }