From de9bee0354b72ff3533338417fe2cd5ef101cbdf Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 25 May 2008 20:39:31 +0000 Subject: [PATCH] Avoid implicit conversion of integers / pointers to booleans. --- ChangeLog | 5 +++++ libmisc/xmalloc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3ff7b476..c9c63fae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-25 Nicolas François + + * libmisc/xmalloc.c: Avoid implicit conversion of integers / + pointers to booleans. + 2008-05-25 Nicolas François * configure.in, lib/defines.h: Allow usage of booleans in the diff --git a/libmisc/xmalloc.c b/libmisc/xmalloc.c index 8581b5d9..6c34d9b2 100644 --- a/libmisc/xmalloc.c +++ b/libmisc/xmalloc.c @@ -52,7 +52,7 @@ char *xmalloc (size_t size) char *ptr; ptr = (char *) malloc (size); - if (!ptr && size) { + if ((NULL == ptr) && (0 != size)) { fprintf (stderr, _("malloc(%d) failed\n"), (int) size); exit (13); }