From: phcoder Date: Thu, 4 Jun 2009 20:16:13 +0000 (+0000) Subject: 2009-06-04 Vladimir Serbinenko X-Git-Tag: 1.98~868 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8df1d4eb30934a0b57ca327451e390ad4efb412;p=thirdparty%2Fgrub.git 2009-06-04 Vladimir Serbinenko Remove nested functions in efiemu core * efiemu/runtime/efiemu.c (reflect): make static instead of nested --- diff --git a/ChangeLog b/ChangeLog index 01fc3a232..26bb5e5d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-06-04 Vladimir Serbinenko + + Remove nested functions in efiemu core + + * efiemu/runtime/efiemu.c (reflect): make static instead of nested + 2009-06-04 Vladimir Serbinenko Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC diff --git a/efiemu/runtime/efiemu.c b/efiemu/runtime/efiemu.c index f73f843ea..71188130d 100644 --- a/efiemu/runtime/efiemu.c +++ b/efiemu/runtime/efiemu.c @@ -271,25 +271,25 @@ EFI_FUNC (efiemu_set_wakeup_time) (grub_efi_boolean_t enabled, static grub_uint32_t crc32_table [256]; -static void -init_crc32_table (void) +static grub_uint32_t +reflect (grub_uint32_t ref, int len) { - auto grub_uint32_t reflect (grub_uint32_t ref, int len); - grub_uint32_t reflect (grub_uint32_t ref, int len) + grub_uint32_t result = 0; + int i; + + for (i = 1; i <= len; i++) { - grub_uint32_t result = 0; - int i; - - for (i = 1; i <= len; i++) - { - if (ref & 1) - result |= 1 << (len - i); - ref >>= 1; - } - - return result; + if (ref & 1) + result |= 1 << (len - i); + ref >>= 1; } + + return result; +} +static void +init_crc32_table (void) +{ grub_uint32_t polynomial = 0x04c11db7; int i, j;