From e8df1d4eb30934a0b57ca327451e390ad4efb412 Mon Sep 17 00:00:00 2001 From: phcoder Date: Thu, 4 Jun 2009 20:16:13 +0000 Subject: [PATCH] 2009-06-04 Vladimir Serbinenko Remove nested functions in efiemu core * efiemu/runtime/efiemu.c (reflect): make static instead of nested --- ChangeLog | 6 ++++++ efiemu/runtime/efiemu.c | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 16 deletions(-) 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 grub_uint32_t +reflect (grub_uint32_t ref, int len) +{ + grub_uint32_t result = 0; + int i; + + for (i = 1; i <= len; i++) + { + if (ref & 1) + result |= 1 << (len - i); + ref >>= 1; + } + + return result; +} + static void init_crc32_table (void) { - 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++) - { - if (ref & 1) - result |= 1 << (len - i); - ref >>= 1; - } - - return result; - } - grub_uint32_t polynomial = 0x04c11db7; int i, j;