Avoid implicit conversion of integers / pointers to booleans.
This commit is contained in:
parent
ae75a8c0c1
commit
de9bee0354
@ -1,3 +1,8 @@
|
||||
2008-05-25 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* libmisc/xmalloc.c: Avoid implicit conversion of integers /
|
||||
pointers to booleans.
|
||||
|
||||
2008-05-25 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* configure.in, lib/defines.h: Allow usage of booleans in the
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user