summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-10-08 16:28:38 +0000
committerderaadt <deraadt@openbsd.org>2014-10-08 16:28:38 +0000
commitae8fed2da4c8e98594bce670321dbb47e0a338be (patch)
tree5f044c49b604c779c5b06598dd2963e7d0ca0ad9
parenttrivial use of reallocarray (diff)
downloadwireguard-openbsd-ae8fed2da4c8e98594bce670321dbb47e0a338be.tar.xz
wireguard-openbsd-ae8fed2da4c8e98594bce670321dbb47e0a338be.zip
trivial use of getreallocarray()
-rw-r--r--sbin/fsck_ffs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index 83cbb9f36f1..c38c05a2d40 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inode.c,v 1.43 2014/09/06 04:05:40 guenther Exp $ */
+/* $OpenBSD: inode.c,v 1.44 2014/10/08 16:28:38 deraadt Exp $ */
/* $NetBSD: inode.c,v 1.23 1996/10/11 20:15:47 thorpej Exp $ */
/*
@@ -420,8 +420,8 @@ cacheino(union dinode *dp, ino_t inumber)
inp->i_blks[NDADDR + i] = DIP(dp, di_ib[i]);
if (inplast == listmax) {
newlistmax = listmax + 100;
- newinpsort = realloc(inpsort,
- (unsigned)newlistmax * sizeof(struct inoinfo *));
+ newinpsort = reallocarray(inpsort,
+ (unsigned)newlistmax, sizeof(struct inoinfo *));
if (newinpsort == NULL)
errexit("cannot increase directory list");
inpsort = newinpsort;