diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 16:28:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 16:28:13 +0000 |
commit | d9fc2313548da368ace567ad263f45031f1f6932 (patch) | |
tree | 37f03798dfe31493bc15339a47b29e0e396cac12 /sbin/fsck_ext2fs | |
parent | df286e24e09096f4a12604c1955b6ff694d0ae93 (diff) |
trivial use of reallocarray
Diffstat (limited to 'sbin/fsck_ext2fs')
-rw-r--r-- | sbin/fsck_ext2fs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ext2fs/inode.c b/sbin/fsck_ext2fs/inode.c index 068d529162e..142bf07aa92 100644 --- a/sbin/fsck_ext2fs/inode.c +++ b/sbin/fsck_ext2fs/inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inode.c,v 1.22 2014/07/13 16:08:53 pelikan Exp $ */ +/* $OpenBSD: inode.c,v 1.23 2014/10/08 16:28:12 deraadt Exp $ */ /* $NetBSD: inode.c,v 1.8 2000/01/28 16:01:46 bouyer Exp $ */ /* @@ -450,8 +450,8 @@ cacheino(struct ext2fs_dinode *dp, ino_t inumber) memcpy(&inp->i_blks[0], &dp->e2di_blocks[0], (size_t)inp->i_numblks); if (inplast == listmax) { listmax += 100; - inpsort = (struct inoinfo **)realloc((char *)inpsort, - (unsigned)listmax * sizeof(struct inoinfo *)); + inpsort = reallocarray(inpsort, listmax, + sizeof(struct inoinfo *)); if (inpsort == NULL) errexit("cannot increase directory list\n"); } |