From 46ecfc49b6367b2024f457c23eda69decdf2d357 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 10 Mar 2013 20:37:41 +0100 Subject: [PATCH] * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use multiplication rather than division. --- ChangeLog | 5 +++++ grub-core/loader/i386/bsdXX.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8f8de8bfd..4f5a281f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-03-10 Vladimir Serbinenko + + * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use + multiplication rather than division. + 2013-03-10 Vladimir Serbinenko * grub-core/lib/arg.c (grub_arg_list_alloc): Use shifts rather diff --git a/grub-core/loader/i386/bsdXX.c b/grub-core/loader/i386/bsdXX.c index 3f9f09384..9e36cd4b6 100644 --- a/grub-core/loader/i386/bsdXX.c +++ b/grub-core/loader/i386/bsdXX.c @@ -594,7 +594,7 @@ SUFFIX(grub_openbsd_find_ramdisk) (grub_file_t file, return grub_errno; } - for (i = 0, sym = syms; i < symsize / symentsize; + for (i = 0, sym = syms; i * symentsize < symsize; i++, sym = (Elf_Sym *) ((char *) sym + symentsize)) { if (ELF_ST_TYPE (sym->st_info) != STT_OBJECT)