summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-07-13 15:29:05 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-07-13 15:29:05 +0000
commitd236d22228b6a97ce7c79025114524f150fff4cc (patch)
treeb242eac83ec5c1b92073488875fa72c4cb5b0ccc /sys/kern/vfs_bio.c
parentc38623b68ad6f6d9a521c779ac660b49e1590d64 (diff)
use mallocarray where arguments are multipled. ok deraadt
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 16c1fc136ed..19d80b31af2 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.158 2014/07/12 18:43:32 tedu Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.159 2014/07/13 15:29:04 tedu Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*
@@ -441,7 +441,7 @@ bread_cluster(struct vnode *vp, daddr_t blkno, int size, struct buf **rbpp)
if (howmany > maxra)
howmany = maxra;
- xbpp = malloc((howmany + 1) * sizeof(struct buf *), M_TEMP, M_NOWAIT);
+ xbpp = mallocarray((howmany + 1), sizeof(struct buf *), M_TEMP, M_NOWAIT);
if (xbpp == NULL)
goto out;