compare pointer against NULL instead of 0
This commit is contained in:
parent
3f38d7cad6
commit
f8ec6d43b4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: descr.c,v 1.5 2007/04/11 20:56:20 plunky Exp $ */
|
||||
/* $NetBSD: descr.c,v 1.6 2015/12/31 20:35:21 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Lennart Augustsson <augustss@NetBSD.org>
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: descr.c,v 1.5 2007/04/11 20:56:20 plunky Exp $");
|
||||
__RCSID("$NetBSD: descr.c,v 1.6 2015/12/31 20:35:21 jakllsch Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -63,7 +63,7 @@ hid_use_report_desc(const uint8_t *data, unsigned int size)
|
|||
report_desc_t r;
|
||||
|
||||
r = malloc(sizeof(*r) + size);
|
||||
if (r == 0) {
|
||||
if (r == NULL) {
|
||||
errno = ENOMEM;
|
||||
return (NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue