summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-02-28 13:23:24 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-02-28 13:23:24 +0000
commit631d5075c62ffe32482381854d9d1c1195d852e8 (patch)
tree2b8a7b985316b06ac3683b10ee8375aec74350a2 /sys
parent8b739a07bebfb5fb6657752b53b02c1ac0ba4042 (diff)
we allocate an array of pointers, so we should bzero an array of pointers,
not an array of ints.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/atascsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index dbd96b6376e..bc104a7b2d6 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.7 2007/02/19 12:06:16 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.8 2007/02/28 13:23:23 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -112,7 +112,7 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa)
as->as_ports = malloc(sizeof(struct ata_port *) * aaa->aaa_nports,
M_DEVBUF, M_WAITOK);
- bzero(as->as_ports, sizeof(int) * aaa->aaa_nports);
+ bzero(as->as_ports, sizeof(struct ata_port *) * aaa->aaa_nports);
/* fill in the port array with the type of devices there */
for (i = 0; i < as->as_link.adapter_buswidth; i++)