]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Thu, 4 Jun 2009 20:16:13 +0000 (20:16 +0000)
committerphcoder <phcoder@localhost>
Thu, 4 Jun 2009 20:16:13 +0000 (20:16 +0000)
Remove nested functions in efiemu core

* efiemu/runtime/efiemu.c (reflect): make static instead of nested

ChangeLog
efiemu/runtime/efiemu.c

index 01fc3a232c8a9b82d32bfe90c147f150b0453615..26bb5e5d8f43950f9a16c149759ea7afe1bbae58 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Remove nested functions in efiemu core
+
+       * efiemu/runtime/efiemu.c (reflect): make static instead of nested
+       
 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
index f73f843eaf07f14258e2add0efc7671c83e5bb65..71188130d4983fd5b1ca88f4c3e3406ef205a751 100644 (file)
@@ -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;