diff options
author | 2015-10-12 21:09:08 +0000 | |
---|---|---|
committer | 2015-10-12 21:09:08 +0000 | |
commit | 853380368cc21946f0a44c4fc8da82b0549837e2 (patch) | |
tree | 550cde51b8401f23723204104271a5dc06a52110 | |
parent | Check that the disk specified on the command line is the disk that (diff) | |
download | wireguard-openbsd-853380368cc21946f0a44c4fc8da82b0549837e2.tar.xz wireguard-openbsd-853380368cc21946f0a44c4fc8da82b0549837e2.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.
-rw-r--r-- | usr.bin/mandoc/mandoc_aux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandoc_aux.c b/usr.bin/mandoc/mandoc_aux.c index 7e7e19d5729..0536595bd72 100644 --- a/usr.bin/mandoc/mandoc_aux.c +++ b/usr.bin/mandoc/mandoc_aux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandoc_aux.c,v 1.6 2015/10/11 21:06:59 schwarze Exp $ */ +/* $OpenBSD: mandoc_aux.c,v 1.7 2015/10/12 21:09:08 schwarze Exp $ */ /* * Copyright (c) 2009, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -89,7 +89,7 @@ mandoc_strdup(const char *ptr) char *p; p = strdup(ptr); - if (ptr == NULL) + if (p == NULL) err((int)MANDOCLEVEL_SYSERR, NULL); return p; } |