From 2f514e54673e02af0b97bb7b3f933a7c0f2f517a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 12 Oct 2015 21:09:54 +0000 Subject: Check the right pointer against NULL; fixing a pasto introduced in the previous commit; found by Svyatoslav Mishyn with cppcheck. --- mandoc_aux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mandoc_aux.c') 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 * Copyright (c) 2014 Ingo Schwarze @@ -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; } -- cgit v1.2.3