diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-12 18:30:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-04-12 18:30:44 +0000 |
commit | 8dd1eac8e369bf436f5d80f002150e4d866f572e (patch) | |
tree | 7466567c5487d7e6c8aa47894c4bb5da67422349 /sbin | |
parent | 9ec419a894cc815d72575f2899101be0008b94d2 (diff) |
do not downsize a type before calling malloc
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/quotacheck/quotacheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/quotacheck/quotacheck.c b/sbin/quotacheck/quotacheck.c index df7ba9d5cf6..5dbc445e539 100644 --- a/sbin/quotacheck/quotacheck.c +++ b/sbin/quotacheck/quotacheck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quotacheck.c,v 1.27 2012/03/24 15:39:54 jsg Exp $ */ +/* $OpenBSD: quotacheck.c,v 1.28 2012/04/12 18:30:43 deraadt Exp $ */ /* $NetBSD: quotacheck.c,v 1.12 1996/03/30 22:34:25 mark Exp $ */ /* @@ -713,7 +713,7 @@ setinodebuf(ino_t inum) partialcnt = fullcnt; partialsize = inobufsize; } - if ((inodebuf = malloc((unsigned)inobufsize)) == NULL) + if ((inodebuf = malloc((size_t)inobufsize)) == NULL) errx(1, "cannot allocate space for inode buffer"); } |