Author: araujo
Date: Thu Apr 14 12:51:06 2016
New Revision: 297964
URL: https://svnweb.freebsd.org/changeset/base/297964

Log:
  Use NULL instead of 0 for pointers.
  
  The malloc will return a pointer to the allocated memory if successful,
  otherwise a NULL pointer is returned.

Modified:
  head/usr.sbin/fstyp/fstyp.c

Modified: head/usr.sbin/fstyp/fstyp.c
==============================================================================
--- head/usr.sbin/fstyp/fstyp.c Thu Apr 14 12:50:27 2016        (r297963)
+++ head/usr.sbin/fstyp/fstyp.c Thu Apr 14 12:51:06 2016        (r297964)
@@ -82,7 +82,7 @@ read_buf(FILE *fp, off_t off, size_t len
        }
 
        buf = malloc(len);
-       if (buf == 0) {
+       if (buf == NULL) {
                warn("cannot malloc %zd bytes of memory", len);
                return (NULL);
        }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to