aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-05 22:13:31 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-05 22:13:31 +0000
commitabefbc51f4ea64c976501f518f28304c5c44f91b (patch)
tree32c7f20de8866dda8ed0dce0747109fc66c3e8b0
parenta5392bed0982a8e61ca5578149683572adaaf279 (diff)
downloadglibc-abefbc51f4ea64c976501f518f28304c5c44f91b.tar
glibc-abefbc51f4ea64c976501f518f28304c5c44f91b.tar.gz
glibc-abefbc51f4ea64c976501f518f28304c5c44f91b.tar.bz2
glibc-abefbc51f4ea64c976501f518f28304c5c44f91b.zip
Update.
2003-04-05 Ulrich Drepper <drepper@redhat.com> * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r): Always initialize *signgamp before returning an error.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/ieee754/ldbl-96/e_gammal_r.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 90c7c3d1f9..33fac37dbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-05 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
+ Always initialize *signgamp before returning an error.
+
2003-04-05 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/i386/setcontext.S: Rewrite to avoid writing
diff --git a/sysdeps/ieee754/ldbl-96/e_gammal_r.c b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
index 2e365a7bef..f19a072179 100644
--- a/sysdeps/ieee754/ldbl-96/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -45,8 +45,11 @@ __ieee754_gammal_r (long double x, int *signgamp)
return x - x;
}
if ((es & 0x7fff) == 0x7fff && ((hx & 0x7fffffff) | lx) != 0)
- /* NaN, return it. */
- return x;
+ {
+ /* NaN, return it. */
+ *signgamp = 0;
+ return x;
+ }
if ((es & 0x8000) != 0 && x < 0xffffffff && __rintl (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */