Eliminate nested function in efiemu core
PATCH 8/18 Eliminate nested function in efiemu core
Instead of adding -fnested-functions to efiemu core compilation I simply removed the only nested functions it had (made it static)
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko
efiemu/runtime/efiemu.c +15 -15
@@ -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) { - autogrub_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;