aboutsummaryrefslogtreecommitdiff
path: root/e2fsprogs
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-08-03 20:07:35 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-08-03 20:07:35 +0000
commite5765408936171c2e0c37c4eaca8e1a187ef4235 (patch)
tree2d31e921a759c769f339055c9946205fabef5cbf /e2fsprogs
parent2265911dfe0141d98022f3054f4af2c7976e0921 (diff)
downloadbusybox-w32-e5765408936171c2e0c37c4eaca8e1a187ef4235.tar.gz
busybox-w32-e5765408936171c2e0c37c4eaca8e1a187ef4235.tar.bz2
busybox-w32-e5765408936171c2e0c37c4eaca8e1a187ef4235.zip
Remove xcalloc() and convert its callers to xzalloc(). About half of them
were using "1" as one of the arguments anyway, and as for the rest a multiply and a push isn't noticeably bigger than pushing two arguments on the stack. git-svn-id: svn://busybox.net/trunk/busybox@15771 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'e2fsprogs')
-rw-r--r--e2fsprogs/fsck.c4
-rw-r--r--e2fsprogs/mke2fs.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index afb6f0c7d..99ffed1c5 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -877,8 +877,8 @@ static void compile_fs_type(char *fs_type, struct fs_type_compile *cmp)
877 } 877 }
878 } 878 }
879 879
880 cmp->list = xcalloc(num, sizeof(char *)); 880 cmp->list = xzalloc(num * sizeof(char *));
881 cmp->type = xcalloc(num, sizeof(int)); 881 cmp->type = xzalloc(num * sizeof(int));
882 cmp->negate = 0; 882 cmp->negate = 0;
883 883
884 if (!fs_type) 884 if (!fs_type)
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index ea6afb92c..687f18567 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -401,7 +401,7 @@ static errcode_t zero_blocks(ext2_filsys fs, blk_t blk, int num,
401 } 401 }
402 /* Allocate the zeroizing buffer if necessary */ 402 /* Allocate the zeroizing buffer if necessary */
403 if (!buf) { 403 if (!buf) {
404 buf = xcalloc(fs->blocksize, STRIDE_LENGTH); 404 buf = xzalloc(fs->blocksize * STRIDE_LENGTH);
405 } 405 }
406 /* OK, do the write loop */ 406 /* OK, do the write loop */
407 next_update = 0; 407 next_update = 0;