Author: myles
Date: 2009-11-12 00:32:36 +0100 (Thu, 12 Nov 2009)
New Revision: 4935

Modified:
   trunk/src/arch/i386/boot/coreboot_table.c
Log:
Silence an ugly-looking warning.  Two casts were not enough, so just don't cast
it.  Trust the option_table generator to get the length correct.

Signed-off-by: Myles Watson <[email protected]>
Acked-by: Peter Stuge <[email protected]>



Modified: trunk/src/arch/i386/boot/coreboot_table.c
===================================================================
--- trunk/src/arch/i386/boot/coreboot_table.c   2009-11-11 21:32:23 UTC (rev 
4934)
+++ trunk/src/arch/i386/boot/coreboot_table.c   2009-11-11 23:32:36 UTC (rev 
4935)
@@ -485,11 +485,10 @@
 
 #if (CONFIG_HAVE_OPTION_TABLE == 1) 
        {
-               struct lb_record *rec_dest, *rec_src;
-               /* Write the option config table... */
+               struct lb_record *rec_dest;
+               /* Copy the option config table, it's already a lb_record... */
                rec_dest = lb_new_record(head);
-               rec_src = (struct lb_record *)(void *)&option_table;
-               memcpy(rec_dest,  rec_src, rec_src->size);
+               memcpy(rec_dest,  &option_table, sizeof(option_table));
                /* Create cmos checksum entry in coreboot table */
                lb_cmos_checksum(head);
        }


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to