* grub-core/fs/squash4.c (direct_read): Rename read to curread to

avoid shadowing.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-10 12:17:40 +01:00
parent 7b5784d4d3
commit 22965bce9b
2 changed files with 15 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/squash4.c (direct_read): Rename read to curread to
avoid shadowing.
2012-02-10 Vladimir Serbinenko <phcoder@gmail.com> 2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename * grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename

View file

@ -769,11 +769,11 @@ direct_read (struct grub_squash_data *data,
cumulated_uncompressed_size = data->blksz * (grub_disk_addr_t) i; cumulated_uncompressed_size = data->blksz * (grub_disk_addr_t) i;
while (cumulated_uncompressed_size < off + len) while (cumulated_uncompressed_size < off + len)
{ {
grub_size_t boff, read; grub_size_t boff, curread;
boff = off - cumulated_uncompressed_size; boff = off - cumulated_uncompressed_size;
read = data->blksz - boff; curread = data->blksz - boff;
if (read > len) if (curread > len)
read = len; curread = len;
if (!(ino->block_sizes[i] if (!(ino->block_sizes[i]
& grub_cpu_to_le32_compile_time (SQUASH_BLOCK_UNCOMPRESSED))) & grub_cpu_to_le32_compile_time (SQUASH_BLOCK_UNCOMPRESSED)))
{ {
@ -794,8 +794,8 @@ direct_read (struct grub_squash_data *data,
grub_free (block); grub_free (block);
return -1; return -1;
} }
if (data->decompress (block, csize, boff, buf, read, data) if (data->decompress (block, csize, boff, buf, curread, data)
!= (grub_ssize_t) read) != (grub_ssize_t) curread)
{ {
grub_free (block); grub_free (block);
if (!grub_errno) if (!grub_errno)
@ -810,12 +810,12 @@ direct_read (struct grub_squash_data *data,
>> GRUB_DISK_SECTOR_BITS, >> GRUB_DISK_SECTOR_BITS,
(ino->cumulated_block_sizes[i] + a + boff) (ino->cumulated_block_sizes[i] + a + boff)
& (GRUB_DISK_SECTOR_SIZE - 1), & (GRUB_DISK_SECTOR_SIZE - 1),
read, buf); curread, buf);
if (err) if (err)
return -1; return -1;
off += read; off += curread;
len -= read; len -= curread;
buf += read; buf += curread;
cumulated_uncompressed_size += grub_le_to_cpu32 (data->sb.block_size); cumulated_uncompressed_size += grub_le_to_cpu32 (data->sb.block_size);
i++; i++;
} }