]> granicus.if.org Git - shadow/commitdiff
Avoid implicit conversion of integers / pointers to booleans.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 20:39:31 +0000 (20:39 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 20:39:31 +0000 (20:39 +0000)
ChangeLog
libmisc/xmalloc.c

index 3ff7b476f8b7afe2f8aea1920b46d365d1adb6cb..c9c63fae50305e1f651bc7b7a7b7ea5476e1a9ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 8581b5d9522f288f6af6a3a7afd1fc0c99e82aad..6c34d9b23d36c090ab0ed04e3947b2cb90d43288 100644 (file)
@@ -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);
        }