Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 Since regs->fxstate is actually of type...



details:   https://anonhg.NetBSD.org/src/rev/5f88faf96362
branches:  trunk
changeset: 325214:5f88faf96362
user:      dsl <dsl%NetBSD.org@localhost>
date:      Thu Dec 12 22:41:03 2013 +0000

description:
Since regs->fxstate is actually of type 'struct fxsave64' use a structure
  copy instead of a 'not obviously incorrect' memcpy().

diffstat:

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

diffs (27 lines):

diff -r c9743d044c8a -r 5f88faf96362 sys/arch/amd64/amd64/process_machdep.c
--- a/sys/arch/amd64/amd64/process_machdep.c    Thu Dec 12 18:20:49 2013 +0000
+++ b/sys/arch/amd64/amd64/process_machdep.c    Thu Dec 12 22:41:03 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.23 2013/12/01 01:05:16 christos Exp $    */
+/*     $NetBSD: process_machdep.c,v 1.24 2013/12/12 22:41:03 dsl Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.23 2013/12/01 01:05:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.24 2013/12/12 22:41:03 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -130,7 +130,7 @@
                l->l_md.md_flags |= MDL_USEDFPU;
        }
 
-       memcpy(&regs->fxstate, frame, sizeof(*regs));
+       regs->fxstate = *frame;
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index