On Jan 24, 2008 4:29 PM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Bean <[EMAIL PROTECTED]> writes: > > > On Jan 23, 2008 6:36 PM, Marco Gerards <[EMAIL PROTECTED]> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel