[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] PNG image reader
From: |
Bean |
Subject: |
Re: [PATCH] PNG image reader |
Date: |
Thu, 24 Jan 2008 20:02:26 +0800 |
On Jan 24, 2008 4:29 PM, Marco Gerards <address@hidden> wrote:
> Bean <address@hidden> writes:
>
> > On Jan 23, 2008 6:36 PM, Marco Gerards <address@hidden> wrote:
> >> > static grub_uint32_t
> >> > grub_png_get_dword (struct grub_png_data *data)
> >> > {
> >> > grub_uint32_t r;
> >> >
> >> > r = 0;
> >>
> >> Why this?
> >
> > just to make sure if grub_file_read fails, this function will return 0.
>
> It would better to do proper error handling. This error is never
> picked up... How about:
>
> static grub_err_t
> grub_png_get_dword (struct grub_png_data *data, grub_uint32_t *val)
>
>
because grub_png_get_byte and grub_png_get_dword appear in many
places, checking every call is not efficient. i have added test in
critical place to ensure error will be caught. however, if you think
strict checking is necessary, i can make the change.
--
Bean
- [PATCH] PNG image reader, Bean, 2008/01/11
- Re: [PATCH] PNG image reader, Bean, 2008/01/12
- Re: [PATCH] PNG image reader, Bean, 2008/01/14
- Re: [PATCH] PNG image reader, Marco Gerards, 2008/01/23
- Re: [PATCH] PNG image reader, Bean, 2008/01/23
- Re: [PATCH] PNG image reader, Marco Gerards, 2008/01/24
- Re: [PATCH] PNG image reader,
Bean <=
- Re: [PATCH] PNG image reader, Marco Gerards, 2008/01/24
- Re: [PATCH] PNG image reader, Bean, 2008/01/24
- Re: [PATCH] PNG image reader, Marco Gerards, 2008/01/25
- Re: [PATCH] PNG image reader, Bean, 2008/01/26
- Re: [PATCH] PNG image reader, Marco Gerards, 2008/01/29
- Re: [PATCH] PNG image reader, Bean, 2008/01/29