* grub-core/io/bufio.c (grub_bufio_open): Use grub_zalloc instead of

explicitly zeroing elements.
* grub-core/io/gzio.c (grub_gzio_open): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_open): Remove explicit zeroing
of elements in a structure already allocated using grub_zalloc.
* grub-core/io/xzio.c (grub_xzio_open): Likewise.
This commit is contained in:
Colin Watson 2013-01-07 10:45:05 +00:00
parent 86065b0ad6
commit f8861eaf9f
5 changed files with 12 additions and 17 deletions

View file

@ -1130,7 +1130,7 @@ grub_gzio_open (grub_file_t io)
grub_file_t file;
grub_gzio_t gzio = 0;
file = (grub_file_t) grub_malloc (sizeof (*file));
file = (grub_file_t) grub_zalloc (sizeof (*file));
if (! file)
return 0;
@ -1144,9 +1144,7 @@ grub_gzio_open (grub_file_t io)
gzio->file = io;
file->device = io->device;
file->offset = 0;
file->data = gzio;
file->read_hook = 0;
file->fs = &grub_gzio_fs;
file->not_easily_seekable = 1;