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:
Marcelo Araujo 2016-04-14 12:51:06 +00:00
parent 4f6dd82a2f
commit d11537c785
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297964

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