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); }