* grub-core/io/xzio.c: Fix code style issues
This commit is contained in:
parent
90162423e9
commit
40ea05dee4
2 changed files with 13 additions and 7 deletions
|
@ -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 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
2011-06-24 Manoel Rebelo Abranches <mrabran@gmail.com>
|
2011-06-24 Manoel Rebelo Abranches <mrabran@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,8 @@ static int
|
||||||
test_header (grub_file_t file)
|
test_header (grub_file_t file)
|
||||||
{
|
{
|
||||||
grub_xzio_t xzio = file->data;
|
grub_xzio_t xzio = file->data;
|
||||||
|
enum xz_ret ret;
|
||||||
|
|
||||||
xzio->buf.in_size = grub_file_read (xzio->file, xzio->inbuf,
|
xzio->buf.in_size = grub_file_read (xzio->file, xzio->inbuf,
|
||||||
STREAM_HEADER_SIZE);
|
STREAM_HEADER_SIZE);
|
||||||
|
|
||||||
|
@ -101,7 +103,7 @@ test_header (grub_file_t file)
|
||||||
return 0;
|
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)
|
if (ret == XZ_FORMAT_ERROR)
|
||||||
{
|
{
|
||||||
|
@ -132,8 +134,8 @@ test_footer (grub_file_t file)
|
||||||
grub_uint64_t records;
|
grub_uint64_t records;
|
||||||
|
|
||||||
grub_file_seek (xzio->file, xzio->file->size - FOOTER_MAGIC_SIZE);
|
grub_file_seek (xzio->file, xzio->file->size - FOOTER_MAGIC_SIZE);
|
||||||
if (grub_file_read (xzio->file, footer, FOOTER_MAGIC_SIZE) !=
|
if (grub_file_read (xzio->file, footer, FOOTER_MAGIC_SIZE)
|
||||||
FOOTER_MAGIC_SIZE
|
!= FOOTER_MAGIC_SIZE
|
||||||
|| grub_memcmp (footer, FOOTER_MAGIC, FOOTER_MAGIC_SIZE) != 0)
|
|| grub_memcmp (footer, FOOTER_MAGIC, FOOTER_MAGIC_SIZE) != 0)
|
||||||
goto ERROR;
|
goto ERROR;
|
||||||
|
|
||||||
|
@ -150,8 +152,8 @@ test_footer (grub_file_t file)
|
||||||
xzio->file->size - XZ_STREAM_FOOTER_SIZE - backsize);
|
xzio->file->size - XZ_STREAM_FOOTER_SIZE - backsize);
|
||||||
|
|
||||||
/* Test index marker. */
|
/* Test index marker. */
|
||||||
if (grub_file_read (xzio->file, &imarker, sizeof (imarker)) !=
|
if (grub_file_read (xzio->file, &imarker, sizeof (imarker))
|
||||||
sizeof (imarker) && imarker != 0x00)
|
!= sizeof (imarker) && imarker != 0x00)
|
||||||
goto ERROR;
|
goto ERROR;
|
||||||
|
|
||||||
if (read_vli (xzio->file, &records) <= 0)
|
if (read_vli (xzio->file, &records) <= 0)
|
||||||
|
|
Loading…
Reference in a new issue