summaryrefslogtreecommitdiffstats
path: root/mandoc_aux.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-12 21:09:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-12 21:09:54 +0000
commit7b85c1edf6426e270978b06fc65367582dda9ec2 (patch)
tree27da1fdd7a1fdeaa4d0380026e418ecff6afb85c /mandoc_aux.c
parentd8c6ba86ac437e53d413391925cc57114f4110b8 (diff)
downloadmandoc-7b85c1edf6426e270978b06fc65367582dda9ec2.tar.gz
Check the right pointer against NULL;
fixing a pasto introduced in the previous commit; found by Svyatoslav Mishyn <juef at openmailbox dot org> with cppcheck.
Diffstat (limited to 'mandoc_aux.c')
-rw-r--r--mandoc_aux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mandoc_aux.c b/mandoc_aux.c
index 30a3bd52..c83da7de 100644
--- a/mandoc_aux.c
+++ b/mandoc_aux.c
@@ -95,7 +95,7 @@ mandoc_strdup(const char *ptr)
char *p;
p = strdup(ptr);
- if (ptr == NULL)
+ if (p == NULL)
err((int)MANDOCLEVEL_SYSERR, NULL);
return p;
}