Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/common/sf_llrint.c')
-rw-r--r--newlib/libm/common/sf_llrint.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/newlib/libm/common/sf_llrint.c b/newlib/libm/common/sf_llrint.c
index 7558e89ac..905a5b21d 100644
--- a/newlib/libm/common/sf_llrint.c
+++ b/newlib/libm/common/sf_llrint.c
@@ -60,9 +60,7 @@ TWO23[2]={
if (j0 < (int)(sizeof (long long int) * 8) - 1)
{
- if (j0 < -1)
- return 0;
- else if (j0 >= 23)
+ if (j0 >= 23)
result = (long long int) ((i0 & 0x7fffff) | 0x800000) << (j0 - 23);
else
{
@@ -76,7 +74,7 @@ TWO23[2]={
j0 = ((i0 >> 23) & 0xff) - 0x7f;
i0 &= 0x7fffff;
i0 |= 0x800000;
- result = i0 >> (23 - j0);
+ result = (j0 < 0 ? 0 : i0 >> (23 - j0));
}
}
else