Source-Changes-HG archive

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

[src/trunk]: src/lib/libm/arch/i387 PR/50822: David Binderman: Fix copy length.



details:   https://anonhg.NetBSD.org/src/rev/f44346769c70
branches:  trunk
changeset: 343631:f44346769c70
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 17 19:54:11 2016 +0000

description:
PR/50822: David Binderman: Fix copy length.

diffstat:

 lib/libm/arch/i387/fenv.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 185ab237840f -r f44346769c70 lib/libm/arch/i387/fenv.c
--- a/lib/libm/arch/i387/fenv.c Wed Feb 17 19:52:20 2016 +0000
+++ b/lib/libm/arch/i387/fenv.c Wed Feb 17 19:54:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $ */
+/* $NetBSD: fenv.c,v 1.7 2016/02/17 19:54:11 christos Exp $ */
 
 /*-
  * Copyright (c) 2004-2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: fenv.c,v 1.6 2013/11/11 00:31:51 joerg Exp $");
+__RCSID("$NetBSD: fenv.c,v 1.7 2016/02/17 19:54:11 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -400,9 +400,8 @@
        __fe_dfl_env.x87.unused1 = env.x87.unused1;
        __fe_dfl_env.x87.unused2 = env.x87.unused2;
        __fe_dfl_env.x87.unused3 = env.x87.unused3;
-       memcpy(__fe_dfl_env.x87.others,
-              env.x87.others,
-              sizeof(__fe_dfl_env.x87.others) / sizeof(uint32_t));
+       memcpy(__fe_dfl_env.x87.others, env.x87.others,
+           sizeof(__fe_dfl_env.x87.others));
 
        __fldenv(envp->x87);
        if (__HAS_SSE)
@@ -436,9 +435,8 @@
        __fe_dfl_env.x87.unused1 = env.x87.unused1;
        __fe_dfl_env.x87.unused2 = env.x87.unused2;
        __fe_dfl_env.x87.unused3 = env.x87.unused3;
-       memcpy(__fe_dfl_env.x87.others,
-              env.x87.others,
-              sizeof(__fe_dfl_env.x87.others) / sizeof(uint32_t));
+       memcpy(__fe_dfl_env.x87.others, env.x87.others,
+           sizeof(__fe_dfl_env.x87.others));
 
        __fnstsw(&status);
        if (__HAS_SSE)



Home | Main Index | Thread Index | Old Index