diff lib/vasnprintf.c @ 8865:9e203d8ade65

Stricter check for printf result for NaN arguments.
author Bruno Haible <bruno@clisp.org>
date Tue, 22 May 2007 01:07:46 +0000 (2007-05-22)
parents 771a56a41b5b
children f15c03805bd9
line wrap: on
line diff
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -1297,17 +1297,16 @@
 # if NEED_PRINTF_INFINITE_DOUBLE
 			 || (a.arg[dp->arg_index].type == TYPE_DOUBLE
 			     /* The systems (mingw) which produce wrong output
-				for Inf and -Inf also do so for NaN and -0.0.
-				Therefore we treat these cases here as well.  */
+				for Inf, -Inf, and NaN also do so for -0.0.
+				Therefore we treat this case here as well.  */
 			     && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double))
 # endif
 # if NEED_PRINTF_LONG_DOUBLE
 			 || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
 # elif NEED_PRINTF_INFINITE_LONG_DOUBLE
 			 || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
-			     /* The systems which produce wrong output for Inf
-				and -Inf also do so for NaN.  Therefore treat
-				this case here as well.  */
+			     /* Some systems produce wrong output for Inf,
+				-Inf, and NaN.  */
 			     && is_infinitel (a.arg[dp->arg_index].a.a_longdouble))
 # endif
 			))