2009-06-10 Pavel Roskin <proski@gnu.org>
* kern/file.c (grub_file_read): Use void pointer for the buffer. Adjust all callers.
This commit is contained in:
parent
27d5fef717
commit
5c5215d5e2
22 changed files with 59 additions and 56 deletions
|
@ -88,7 +88,7 @@ grub_jpeg_get_byte (struct grub_jpeg_data *data)
|
|||
grub_uint8_t r;
|
||||
|
||||
r = 0;
|
||||
grub_file_read (data->file, (char *) &r, 1);
|
||||
grub_file_read (data->file, &r, 1);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ grub_jpeg_get_word (struct grub_jpeg_data *data)
|
|||
grub_uint16_t r;
|
||||
|
||||
r = 0;
|
||||
grub_file_read (data->file, (char *) &r, sizeof (grub_uint16_t));
|
||||
grub_file_read (data->file, &r, sizeof (grub_uint16_t));
|
||||
|
||||
return grub_be_to_cpu16 (r);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ grub_jpeg_decode_huff_table (struct grub_jpeg_data *data)
|
|||
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||
"jpeg: too many huffman tables");
|
||||
|
||||
if (grub_file_read (data->file, (char *) &count, sizeof (count)) !=
|
||||
if (grub_file_read (data->file, &count, sizeof (count)) !=
|
||||
sizeof (count))
|
||||
return grub_errno;
|
||||
|
||||
|
@ -194,7 +194,7 @@ grub_jpeg_decode_huff_table (struct grub_jpeg_data *data)
|
|||
if (grub_errno)
|
||||
return grub_errno;
|
||||
|
||||
if (grub_file_read (data->file, (char *) data->huff_value[id], n) != n)
|
||||
if (grub_file_read (data->file, data->huff_value[id], n) != n)
|
||||
return grub_errno;
|
||||
|
||||
base = 0;
|
||||
|
@ -234,7 +234,7 @@ grub_jpeg_decode_quan_table (struct grub_jpeg_data *data)
|
|||
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||
"jpeg: too many quantization tables");
|
||||
|
||||
if (grub_file_read (data->file, (char *) &data->quan_table[id], 64) != 64)
|
||||
if (grub_file_read (data->file, &data->quan_table[id], 64) != 64)
|
||||
return grub_errno;
|
||||
|
||||
if (data->file->offset != next_marker)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue