summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net80211/ieee80211_input.c4
-rw-r--r--sys/ntfs/ntfs_subr.c4
-rw-r--r--sys/uvm/uvm_swap.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 7104cedb38f..9645357ea19 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.189 2017/03/13 07:44:10 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.190 2017/04/09 18:15:32 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 = malloc(IEEE80211_BA_MAX_WINSZ * sizeof(*ba->ba_buf),
+ ba->ba_buf = mallocarray(IEEE80211_BA_MAX_WINSZ, sizeof(*ba->ba_buf),
M_DEVBUF, M_NOWAIT | M_ZERO);
if (ba->ba_buf == NULL)
goto refuse;
diff --git a/sys/ntfs/ntfs_subr.c b/sys/ntfs/ntfs_subr.c
index 834d6f160d5..641ff218209 100644
--- a/sys/ntfs/ntfs_subr.c
+++ b/sys/ntfs/ntfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_subr.c,v 1.48 2016/09/01 08:40:39 natano Exp $ */
+/* $OpenBSD: ntfs_subr.c,v 1.49 2017/04/09 18:15:09 dhill Exp $ */
/* $NetBSD: ntfs_subr.c,v 1.4 2003/04/10 21:37:32 jdolecek Exp $ */
/*-
@@ -1754,7 +1754,7 @@ ntfs_toupper_use(struct mount *mp, struct ntfsmount *ntmp, struct proc *p)
* XXX for now, just the first 256 entries are used anyway,
* so don't bother reading more
*/
- ntfs_toupper_tab = malloc(256 * 256 * sizeof(wchar), M_NTFSRDATA,
+ ntfs_toupper_tab = mallocarray(256 * 256, sizeof(wchar), M_NTFSRDATA,
M_WAITOK);
if ((error = VFS_VGET(mp, NTFS_UPCASEINO, &vp)))
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c
index d2edbcc44f4..a0de3e668f7 100644
--- a/sys/uvm/uvm_swap.c
+++ b/sys/uvm/uvm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_swap.c,v 1.140 2016/09/15 02:00:18 dlg Exp $ */
+/* $OpenBSD: uvm_swap.c,v 1.141 2017/04/09 18:14:39 dhill Exp $ */
/* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */
/*
@@ -320,8 +320,8 @@ uvm_swap_initcrypt(struct swapdev *sdp, int npages)
*/
sdp->swd_decrypt = malloc(SWD_DCRYPT_SIZE(npages), M_VMSWAP,
M_WAITOK|M_ZERO);
- sdp->swd_keys = malloc(SWD_KEY_SIZE(npages) * sizeof(struct swap_key),
- M_VMSWAP, M_WAITOK|M_ZERO);
+ sdp->swd_keys = mallocarray(SWD_KEY_SIZE(npages),
+ sizeof(struct swap_key), M_VMSWAP, M_WAITOK|M_ZERO);
}
#endif /* UVM_SWAP_ENCRYPT */