diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 16:28:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-10-08 16:28:39 +0000 |
commit | cfd270fa2119c688a05ef408f7b073c80ec47e25 (patch) | |
tree | 1da1d4f89f8c7e066660b400277392a5952c18a2 /sbin | |
parent | d9fc2313548da368ace567ad263f45031f1f6932 (diff) |
trivial use of getreallocarray()
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsck_ffs/inode.c | 6 |
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; |