[2255] 2009-06-04 Vladimir Serbinenko <[email protected]>

Vladimir Serbinenko <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2255
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2255
Author:   phcoder
Date:     2009-06-04 20:16:13 +0000 (Thu, 04 Jun 2009)
Log Message:
-----------
2009-06-04  Vladimir Serbinenko  <[email protected]>

	Remove nested functions in efiemu core

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

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/efiemu/runtime/efiemu.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-06-04 20:10:51 UTC (rev 2254)
+++ trunk/grub2/ChangeLog	2009-06-04 20:16:13 UTC (rev 2255)
@@ -1,5 +1,11 @@
 2009-06-04  Vladimir Serbinenko  <[email protected]>
 
+	Remove nested functions in efiemu core
+
+	* efiemu/runtime/efiemu.c (reflect): make static instead of nested
+	
+2009-06-04  Vladimir Serbinenko  <[email protected]>
+
 	Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
 
 	* efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as

Modified: trunk/grub2/efiemu/runtime/efiemu.c
===================================================================
--- trunk/grub2/efiemu/runtime/efiemu.c	2009-06-04 20:10:51 UTC (rev 2254)
+++ trunk/grub2/efiemu/runtime/efiemu.c	2009-06-04 20:16:13 UTC (rev 2255)
@@ -271,25 +271,25 @@
 
 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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.