]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Change error code for underflows in strtod
authorUlrich Drepper <drepper@gmail.com>
Thu, 7 Jul 2011 00:57:55 +0000 (20:57 -0400)
committerAndreas Schwab <schwab@redhat.com>
Thu, 21 Jul 2011 10:15:33 +0000 (12:15 +0200)
(cherry picked from commit 9895c8bc62759a2d7abf95654fb2aefe5677a930)

ChangeLog
stdlib/strtod_l.c

index 534ac2c09413ba17680f8065a0b3a7ff12f67621..b11f5ee012ea1eb58791ba6cc902ce95d26f37bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-22  Marek Polacek  <mpolacek@redhat.com>
+
+       [BZ #9696]
+       * stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM.
+
 2011-06-30  Andreas Schwab  <schwab@redhat.com>
 
        * sysdeps/posix/getaddrinfo.c (gaih_inet): Make sure RES_USE_INET6
index 537d1fbc611cc26d75feb33d2ecfa2cb3989b23c..b3380fdba31ffd2ea0e13f5ce3312424675f8f66 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert string representing a number to float value, using given locale.
-   Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010
+   Copyright (C) 1997,1998,2002,2004,2005,2006,2007,2008,2009,2010,2011
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -185,7 +185,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
 
       if (shift > MANT_DIG)
        {
-         __set_errno (EDOM);
+         __set_errno (ERANGE);
          return 0.0;
        }