diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-12 21:09:54 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-10-12 21:09:54 +0000 |
commit | 2f514e54673e02af0b97bb7b3f933a7c0f2f517a (patch) | |
tree | 69a00dc77babf593354ff52128f1d393e53a7002 /mandoc_aux.c | |
parent | 0b00a696133cf26be258a362bd60da31baecd29f (diff) | |
download | mandoc-2f514e54673e02af0b97bb7b3f933a7c0f2f517a.tar.gz mandoc-2f514e54673e02af0b97bb7b3f933a7c0f2f517a.tar.zst mandoc-2f514e54673e02af0b97bb7b3f933a7c0f2f517a.zip |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mandoc_aux.c b/mandoc_aux.c index 28a6e2f7..ee37f04d 100644 --- a/mandoc_aux.c +++ b/mandoc_aux.c @@ -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.7 2015/10/12 21:09:54 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -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; } |