[coreboot] [commit] r4937 - trunk/src/arch/i386/boot

svn at coreboot.org svn at coreboot.org
Thu Nov 12 14:48:39 CET 2009


Author: myles
Date: 2009-11-12 14:48:39 +0100 (Thu, 12 Nov 2009)
New Revision: 4937

Modified:
   trunk/src/arch/i386/boot/coreboot_table.c
Log:
Get rid of the ugly warning the right way.

Signed-off-by: Myles Watson <mylesgw at gmail.com>
Acked-by: Ronald G. Minnich <rminnich at gmail.com>


Modified: trunk/src/arch/i386/boot/coreboot_table.c
===================================================================
--- trunk/src/arch/i386/boot/coreboot_table.c	2009-11-11 23:59:19 UTC (rev 4936)
+++ trunk/src/arch/i386/boot/coreboot_table.c	2009-11-12 13:48:39 UTC (rev 4937)
@@ -485,11 +485,9 @@
 
 #if (CONFIG_HAVE_OPTION_TABLE == 1) 
 	{
-		struct lb_record *rec_dest, *rec_src;
-		/* Write the option config table... */
-		rec_dest = lb_new_record(head);
-		rec_src = (struct lb_record *)(void *)&option_table;
-		memcpy(rec_dest,  rec_src, rec_src->size);
+		struct lb_record *rec_dest = lb_new_record(head);
+		/* Copy the option config table, it's already a lb_record... */
+		memcpy(rec_dest,  &option_table, option_table.size);
 		/* Create cmos checksum entry in coreboot table */
 		lb_cmos_checksum(head);
 	}





More information about the coreboot mailing list