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.
This commit is contained in:
araujo 2016-04-14 12:51:06 +00:00
parent 2d4e18c4c2
commit 27f4c84ae1

View File

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