* grub-core/io/xzio.c: Fix code style issues

This commit is contained in:
Szymon Janc 2011-06-24 22:37:17 +02:00
parent 90162423e9
commit 40ea05dee4
2 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,7 @@
2011-06-24 Szymon Janc <szymon@janc.net.pl>
* grub-core/io/xzio.c: Fix code style issues
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
2011-06-24 Manoel Rebelo Abranches <mrabran@gmail.com>

View file

@ -48,7 +48,7 @@ static struct grub_fs grub_xzio_fs;
static grub_size_t
decode_vli (const grub_uint8_t buf[], grub_size_t size_max,
grub_uint64_t * num)
grub_uint64_t *num)
{
if (size_max == 0)
return 0;
@ -71,7 +71,7 @@ decode_vli (const grub_uint8_t buf[], grub_size_t size_max,
}
static grub_ssize_t
read_vli (grub_file_t file, grub_uint64_t * num)
read_vli (grub_file_t file, grub_uint64_t *num)
{
grub_uint8_t buf[VLI_MAX_DIGITS];
grub_ssize_t read;
@ -92,6 +92,8 @@ static int
test_header (grub_file_t file)
{
grub_xzio_t xzio = file->data;
enum xz_ret ret;
xzio->buf.in_size = grub_file_read (xzio->file, xzio->inbuf,
STREAM_HEADER_SIZE);
@ -101,7 +103,7 @@ test_header (grub_file_t file)
return 0;
}
enum xz_ret ret = xz_dec_run (xzio->dec, &xzio->buf);
ret = xz_dec_run (xzio->dec, &xzio->buf);
if (ret == XZ_FORMAT_ERROR)
{
@ -132,8 +134,8 @@ test_footer (grub_file_t file)
grub_uint64_t records;
grub_file_seek (xzio->file, xzio->file->size - FOOTER_MAGIC_SIZE);
if (grub_file_read (xzio->file, footer, FOOTER_MAGIC_SIZE) !=
FOOTER_MAGIC_SIZE
if (grub_file_read (xzio->file, footer, FOOTER_MAGIC_SIZE)
!= FOOTER_MAGIC_SIZE
|| grub_memcmp (footer, FOOTER_MAGIC, FOOTER_MAGIC_SIZE) != 0)
goto ERROR;
@ -150,8 +152,8 @@ test_footer (grub_file_t file)
xzio->file->size - XZ_STREAM_FOOTER_SIZE - backsize);
/* Test index marker. */
if (grub_file_read (xzio->file, &imarker, sizeof (imarker)) !=
sizeof (imarker) && imarker != 0x00)
if (grub_file_read (xzio->file, &imarker, sizeof (imarker))
!= sizeof (imarker) && imarker != 0x00)
goto ERROR;
if (read_vli (xzio->file, &records) <= 0)