summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 16:28:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 16:28:39 +0000
commitcfd270fa2119c688a05ef408f7b073c80ec47e25 (patch)
tree1da1d4f89f8c7e066660b400277392a5952c18a2 /sbin/fsck_ffs
parentd9fc2313548da368ace567ad263f45031f1f6932 (diff)
trivial use of getreallocarray()
Diffstat (limited to 'sbin/fsck_ffs')
-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;