]> Zhao Yanbai Git Server - minix.git/commitdiff
libvtreefs: fix naming bug 12/3012/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Sat, 27 Dec 2014 15:07:45 +0000 (16:07 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 29 Jun 2015 10:56:59 +0000 (10:56 +0000)
Change-Id: Ib8767cfef4206ed491855bace6dd8bd58b45b8ce

minix/lib/libvtreefs/extra.c

index f283bfdd1ee9da252893c8d0de292f2769690935..8855c75d772fd055a93c1903392a83ac16063d8c 100644 (file)
@@ -18,10 +18,10 @@ int
 init_extra(unsigned int nr_inodes, size_t inode_extra)
 {
 
-       if (extra_size == 0)
+       if (inode_extra == 0)
                return OK;
 
-       if ((extra_ptr = malloc(nr_inodes * inode_extra)) == NULL)
+       if ((extra_ptr = calloc(nr_inodes, inode_extra)) == NULL)
                return ENOMEM;
 
        extra_size = inode_extra;