On Fri, Mar 21, 2008 at 04:14:46PM +0100, Robert Millan wrote:
> +      soff = sector % data->sectors + 1;
> +      head = sector / data->sectors;

Or rather, as pointed out by Bean on IRC:

  soff = ((grub_uint32_t) sector) % data->sectors + 1;
  head = ((grub_uint32_t) sector) / data->sectors;

to avoid gratuitous 64-bit division where 32-bit is enough.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to