Get rid of the ugly warning the right way.
authorMyles Watson <mylesgw@gmail.com>
Thu, 12 Nov 2009 13:48:39 +0000 (13:48 +0000)
committerMyles Watson <mylesgw@gmail.com>
Thu, 12 Nov 2009 13:48:39 +0000 (13:48 +0000)
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4937 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/arch/i386/boot/coreboot_table.c

index 9eb13b73f1e5f7ca744fad3de3ed5eaaa215cb33..49fef60cdd8f854b1f9ead4b8dca47bba89ebad9 100644 (file)
@@ -485,11 +485,9 @@ unsigned long write_coreboot_table(
 
 #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);
        }