Lines Matching refs:nsectors

349 @@ -1017,7 +1017,7 @@ grub_util_ldm_embed (struct grub_disk *disk, unsigned int *nsectors,
350 *nsectors = lv->size;
351 if (*nsectors > max_nsectors)
352 *nsectors = max_nsectors;
353 - *sectors = grub_malloc (*nsectors * sizeof (**sectors));
354 + *sectors = grub_calloc (*nsectors, sizeof (**sectors));
357 for (i = 0; i < *nsectors; i++)
525 *nsectors = 64 * 2 - 1;
526 if (*nsectors > max_nsectors)
527 *nsectors = max_nsectors;
528 - *sectors = grub_malloc (*nsectors * sizeof (**sectors));
529 + *sectors = grub_calloc (*nsectors, sizeof (**sectors));
532 for (i = 0; i < *nsectors; i++)
667 *nsectors = (VDEV_BOOT_SIZE >> GRUB_DISK_SECTOR_BITS);
668 if (*nsectors > max_nsectors)
669 *nsectors = max_nsectors;
670 - *sectors = grub_malloc (*nsectors * sizeof (**sectors));
671 + *sectors = grub_calloc (*nsectors, sizeof (**sectors));
674 for (i = 0; i < *nsectors; i++)
1502 @@ -199,7 +199,7 @@ gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
1503 *nsectors = ctx.len;
1504 if (*nsectors > max_nsectors)
1505 *nsectors = max_nsectors;
1506 - *sectors = grub_malloc (*nsectors * sizeof (**sectors));
1507 + *sectors = grub_calloc (*nsectors, sizeof (**sectors));
1510 for (i = 0; i < *nsectors; i++)
1515 @@ -337,7 +337,7 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
1516 avail_nsectors = *nsectors;
1517 if (*nsectors > max_nsectors)
1518 *nsectors = max_nsectors;
1519 - *sectors = grub_malloc (*nsectors * sizeof (**sectors));
1520 + *sectors = grub_calloc (*nsectors, sizeof (**sectors));
1523 for (i = 0; i < *nsectors; i++)