summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-08-24 01:19:48 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-08-24 01:19:48 +0000
commitefa8667a804bfacc409a408004fb6e652d415407 (patch)
treec87fca66556bf676cde14015ed677b1c65aeff9c /sys/scsi/sd.c
parent0aaafe9e2db53a89bd3ba32b551710c7c206f52b (diff)
Test xs->bp before de-referencing it. Initialize it to NULL, not 0.
ok deraadt@
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 57513481242..985a34efecc 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.88 2005/08/23 23:38:00 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.89 2005/08/24 01:19:47 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -1269,7 +1269,7 @@ sddump(dev, blkno, va, size)
xs->cmdlen = sizeof(cmd);
xs->resid = nwrt * sectorsize;
xs->error = XS_NOERROR;
- xs->bp = 0;
+ xs->bp = NULL;
xs->data = va;
xs->datalen = nwrt * sectorsize;