diff --git a/lib/libc/gdtoa/hdtoa.c b/lib/libc/gdtoa/hdtoa.c index 6bebf9789423..243bd05ff955 100644 --- a/lib/libc/gdtoa/hdtoa.c +++ b/lib/libc/gdtoa/hdtoa.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdtoa.c,v 1.8 2011/03/21 23:37:42 enami Exp $ */ +/* $NetBSD: hdtoa.c,v 1.9 2011/07/04 11:46:41 mrg Exp $ */ /*- * Copyright (c) 2004, 2005 David Schultz @@ -30,7 +30,7 @@ #if 0 __FBSDID("$FreeBSD: src/lib/libc/gdtoa/_hdtoa.c,v 1.4 2007/01/03 04:57:58 das Exp $"); #else -__RCSID("$NetBSD: hdtoa.c,v 1.8 2011/03/21 23:37:42 enami Exp $"); +__RCSID("$NetBSD: hdtoa.c,v 1.9 2011/07/04 11:46:41 mrg Exp $"); #endif #include @@ -261,6 +261,7 @@ hldtoa(long double e, const char *xdigs, int ndigits, int *decpt, int *sign, char *s, *s0; size_t bufsize; + memset(&u, 0, sizeof u); u.extu_ld = e; *sign = u.extu_ext.ext_sign; diff --git a/lib/libm/src/s_fmaxl.c b/lib/libm/src/s_fmaxl.c index 9c1ffc635ca9..39d92d8141e8 100644 --- a/lib/libm/src/s_fmaxl.c +++ b/lib/libm/src/s_fmaxl.c @@ -25,11 +25,12 @@ */ #include -__RCSID("$NetBSD: s_fmaxl.c,v 1.2 2010/03/08 01:05:20 snj Exp $"); +__RCSID("$NetBSD: s_fmaxl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif +#include #include #include @@ -39,6 +40,7 @@ fmaxl(long double x, long double y) { union ieee_ext_u u[2]; + memset(&u, 0, sizeof u); u[0].extu_ld = x; u[0].extu_ext.ext_frach &= ~0x80000000; u[1].extu_ld = y; diff --git a/lib/libm/src/s_fminl.c b/lib/libm/src/s_fminl.c index 55a5e43bd4b8..3e06c3dbf3b0 100644 --- a/lib/libm/src/s_fminl.c +++ b/lib/libm/src/s_fminl.c @@ -25,12 +25,13 @@ */ #include -__RCSID("$NetBSD: s_fminl.c,v 1.2 2010/03/08 01:05:20 snj Exp $"); +__RCSID("$NetBSD: s_fminl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $"); #ifdef notdef __FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp $"); #endif #include +#include #include #ifdef EXT_EXP_INFNAN @@ -39,6 +40,7 @@ fminl(long double x, long double y) { union ieee_ext_u u[2]; + memset(&u, 0, sizeof u); u[0].extu_ld = x; u[0].extu_ext.ext_frach &= ~0x80000000; u[1].extu_ld = y;