summaryrefslogtreecommitdiff
path: root/sys/dev/pci/cz.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 23:10:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-07-13 23:10:24 +0000
commit7ed78303cb18e6b98d376eb01f6a79bcf6211a0f (patch)
treeb074a2500bf5c87060c6ac6a7480e99344143a86 /sys/dev/pci/cz.c
parenteede121c340508412e23b0664274f4a9e38bc272 (diff)
Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu
Diffstat (limited to 'sys/dev/pci/cz.c')
-rw-r--r--sys/dev/pci/cz.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c
index 9f743932f0b..3703e6aabff 100644
--- a/sys/dev/pci/cz.c
+++ b/sys/dev/pci/cz.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cz.c,v 1.19 2012/03/26 16:23:22 deraadt Exp $ */
+/* $OpenBSD: cz.c,v 1.20 2014/07/13 23:10:23 deraadt Exp $ */
/* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */
/*-
@@ -388,8 +388,8 @@ cz_attach(parent, self, aux)
return;
}
- cz->cz_ports = malloc(sizeof(struct cztty_softc) * cz->cz_nchannels,
- M_DEVBUF, M_WAITOK | M_ZERO);
+ cz->cz_ports = mallocarray(cz->cz_nchannels,
+ sizeof(struct cztty_softc), M_DEVBUF, M_WAITOK | M_ZERO);
cztty_attached_ttys += cz->cz_nchannels;
for (i = 0; i < cz->cz_nchannels; i++) {