summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/adw.c
diff options
context:
space:
mode:
authordhill <dhill@openbsd.org>2017-04-11 14:43:49 +0000
committerdhill <dhill@openbsd.org>2017-04-11 14:43:49 +0000
commit265a1ec57e702d97bc8bccd7cabf77bdfdd08787 (patch)
treeedaf239210013f269929be44bd48c7d9d6f2c730 /sys/dev/ic/adw.c
parentShuffle route/interface changing functions together into kroute.c. Try to (diff)
downloadwireguard-openbsd-265a1ec57e702d97bc8bccd7cabf77bdfdd08787.tar.xz
wireguard-openbsd-265a1ec57e702d97bc8bccd7cabf77bdfdd08787.zip
Partially revert previous mallocarray conversions that contain
constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
Diffstat (limited to 'sys/dev/ic/adw.c')
-rw-r--r--sys/dev/ic/adw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index baebe59b76a..c1efc7f0c13 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.53 2017/04/09 18:07:19 dhill Exp $ */
+/* $OpenBSD: adw.c,v 1.54 2017/04/11 14:43:49 dhill Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -144,7 +144,7 @@ adw_alloc_carriers(ADW_SOFTC *sc)
* Allocate the control structure.
*/
sc->sc_control->carriers =
- mallocarray(ADW_MAX_CARRIER, sizeof(ADW_CARRIER), M_DEVBUF,
+ malloc(ADW_MAX_CARRIER * sizeof(ADW_CARRIER), M_DEVBUF,
M_NOWAIT);
if (sc->sc_control->carriers == NULL)
return (ENOMEM);