Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Fix sizeof() usage in memcpy, curtesy of ...



details:   https://anonhg.NetBSD.org/src/rev/b4884d1b8dea
branches:  trunk
changeset: 766706:b4884d1b8dea
user:      joerg <joerg%NetBSD.org@localhost>
date:      Thu Jun 30 23:28:03 2011 +0000

description:
Fix sizeof() usage in memcpy, curtesy of the new warning in clang.

diffstat:

 sys/arch/i386/i386/machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 32e871b32e8b -r b4884d1b8dea sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Thu Jun 30 22:38:50 2011 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Jun 30 23:28:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.704 2011/06/12 03:35:42 rmind Exp $      */
+/*     $NetBSD: machdep.c,v 1.705 2011/06/30 23:28:03 joerg Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.704 2011/06/12 03:35:42 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.705 2011/06/30 23:28:03 joerg Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -1861,7 +1861,7 @@
                                memcpy(
                                        &pcb->pcb_savefpu.sv_xmm,
                                        &mcp->__fpregs.__fp_reg_set.__fp_xmm_state.__fp_xmm,
-                                       sizeof (&pcb->pcb_savefpu.sv_xmm));
+                                       sizeof (pcb->pcb_savefpu.sv_xmm));
                        } else {
                                /* This is a weird corner case */
                                process_xmm_to_s87((struct savexmm *)



Home | Main Index | Thread Index | Old Index