summaryrefslogtreecommitdiff
path: root/sbin/scsi/libscsi.c
diff options
context:
space:
mode:
authorGleydson Soares <gsoares@cvs.openbsd.org>2016-01-28 17:26:11 +0000
committerGleydson Soares <gsoares@cvs.openbsd.org>2016-01-28 17:26:11 +0000
commit548a2b4655a2174ca2ba5f15851a1f78e735aec6 (patch)
tree4ae41898d6663c37257cdd8f3e09518ca71abe4e /sbin/scsi/libscsi.c
parent67d98809be607bb87afb25ae8f95d64e18b1837e (diff)
malloc(3) returns a pointer, so check against NULL, not 0. (No functional change)
OK millert@
Diffstat (limited to 'sbin/scsi/libscsi.c')
-rw-r--r--sbin/scsi/libscsi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/scsi/libscsi.c b/sbin/scsi/libscsi.c
index 1e394a6d07b..d7572f21e87 100644
--- a/sbin/scsi/libscsi.c
+++ b/sbin/scsi/libscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: libscsi.c,v 1.10 2015/08/20 22:02:21 deraadt Exp $ */
+/* $OpenBSD: libscsi.c,v 1.11 2016/01/28 17:26:10 gsoares Exp $ */
/* Copyright (c) 1994 HD Associates
* (contact: dufault@hda.com)
@@ -701,7 +701,7 @@ scsireq_build(scsireq_t *scsireq, u_long datalen, caddr_t databuf,
/* XXX: Good way to get a memory leak. Perhaps this should be
* removed.
*/
- if ( (scsireq->databuf = malloc(datalen)) == 0)
+ if ( (scsireq->databuf = malloc(datalen)) == NULL)
return 0;
scsireq->datalen = datalen;
@@ -739,7 +739,7 @@ scsireq_t
/* XXX: Good way to get a memory leak. Perhaps this should be
* removed.
*/
- if ( (scsireq->databuf = malloc(datalen)) == 0)
+ if ( (scsireq->databuf = malloc(datalen)) == NULL)
return 0;
scsireq->datalen = datalen;