diff options
author | David Hill <dhill@cvs.openbsd.org> | 2017-04-11 14:43:50 +0000 |
---|---|---|
committer | David Hill <dhill@cvs.openbsd.org> | 2017-04-11 14:43:50 +0000 |
commit | 2c104ec6a5078e740dbdfc731d2566fce0a32cd6 (patch) | |
tree | fb8c92a0af2fff3345386d64a8d879854cf7d15a /sys/net80211 | |
parent | 52b62a1a7fc6ba6abbae074bf6c70d188c88c54c (diff) |
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/net80211')
-rw-r--r-- | sys/net80211/ieee80211_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 9645357ea19..8fd5a9cfa66 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_input.c,v 1.190 2017/04/09 18:15:32 dhill Exp $ */ +/* $OpenBSD: ieee80211_input.c,v 1.191 2017/04/11 14:43:49 dhill Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe @@ -2566,7 +2566,7 @@ ieee80211_recv_addba_req(struct ieee80211com *ic, struct mbuf *m, ba->ba_winstart = ssn; ba->ba_winend = (ba->ba_winstart + ba->ba_winsize - 1) & 0xfff; /* allocate and setup our reordering buffer */ - ba->ba_buf = mallocarray(IEEE80211_BA_MAX_WINSZ, sizeof(*ba->ba_buf), + ba->ba_buf = malloc(IEEE80211_BA_MAX_WINSZ * sizeof(*ba->ba_buf), M_DEVBUF, M_NOWAIT | M_ZERO); if (ba->ba_buf == NULL) goto refuse; |