source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Check the right pointer against NULL; fixing a pasto introduced
@ 2015-10-12 21:10 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-10-12 21:10 UTC (permalink / raw)
  To: source

Log Message:
-----------
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.

Modified Files:
--------------
    mdocml:
        mandoc_aux.c

Revision Data
-------------
Index: mandoc_aux.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mandoc_aux.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lmandoc_aux.c -Lmandoc_aux.c -u -p -r1.6 -r1.7
--- mandoc_aux.c
+++ 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;
 }
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-12 21:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 21:10 mdocml: Check the right pointer against NULL; fixing a pasto introduced schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).