summaryrefslogtreecommitdiff
path: root/util-linux/fdisk.c
diff options
context:
space:
mode:
authorRob Landley2006-08-03 20:07:35 +0000
committerRob Landley2006-08-03 20:07:35 +0000
commit081e38483ec55dcfca3d92434fe94f0777ed962d (patch)
tree2d31e921a759c769f339055c9946205fabef5cbf /util-linux/fdisk.c
parent86b4d64aa3f5ca4c2824a8948541b0e18dfe0a74 (diff)
downloadbusybox-081e38483ec55dcfca3d92434fe94f0777ed962d.zip
busybox-081e38483ec55dcfca3d92434fe94f0777ed962d.tar.gz
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.
Diffstat (limited to 'util-linux/fdisk.c')
-rw-r--r--util-linux/fdisk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 1c93546..310bd55 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -5162,7 +5162,7 @@ add_partition(int n, int sys)
ext_index = n;
pen->ext_pointer = p;
pe4->offset = extended_offset = start;
- pe4->sectorbuffer = xcalloc(1, sector_size);
+ pe4->sectorbuffer = xzalloc(sector_size);
pe4->part_table = pt_offset(pe4->sectorbuffer, 0);
pe4->ext_pointer = pe4->part_table + 1;
pe4->changed = 1;
@@ -5176,7 +5176,7 @@ add_logical(void)
if (partitions > 5 || ptes[4].part_table->sys_ind) {
struct pte *pe = &ptes[partitions];
- pe->sectorbuffer = xcalloc(1, sector_size);
+ pe->sectorbuffer = xzalloc(sector_size);
pe->part_table = pt_offset(pe->sectorbuffer, 0);
pe->ext_pointer = pe->part_table + 1;
pe->offset = 0;