diff options
author | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-09 06:58:30 +0000 |
---|---|---|
committer | Doug Hogan <doug@cvs.openbsd.org> | 2014-12-09 06:58:30 +0000 |
commit | ad90d9845d96f21749e3776b0296938c6d60ca9a (patch) | |
tree | ca999709d208d683272d9911f2706d59a203748f /sys/arch/sparc64/dev/vpci.c | |
parent | 7ac588b8eb1d276029001886214facee144b2fc5 (diff) |
Replace some malloc(n*size,...) calls with mallocarray().
ok tedu@ deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev/vpci.c')
-rw-r--r-- | sys/arch/sparc64/dev/vpci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/vpci.c b/sys/arch/sparc64/dev/vpci.c index 6e86ec1b63c..0633a7cfded 100644 --- a/sys/arch/sparc64/dev/vpci.c +++ b/sys/arch/sparc64/dev/vpci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vpci.c,v 1.17 2014/11/24 22:41:12 kettenis Exp $ */ +/* $OpenBSD: vpci.c,v 1.18 2014/12/09 06:58:29 doug Exp $ */ /* * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org> * @@ -241,8 +241,8 @@ vpci_init_msi(struct vpci_softc *sc, struct vpci_pbm *pbm) pbm->vp_msiaddr |= ((bus_addr_t)msi_addr_range[0]) << 32; msis = getpropint(sc->sc_node, "#msi", 256); - pbm->vp_msi = malloc(msis * sizeof(*pbm->vp_msi), - M_DEVBUF, M_NOWAIT | M_ZERO); + pbm->vp_msi = mallocarray(msis, sizeof(*pbm->vp_msi), M_DEVBUF, + M_NOWAIT | M_ZERO); if (pbm->vp_msi == NULL) return; |