about summary refs log tree commit diff
path: root/sysdeps/libm-ieee754/s_lrintl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-ieee754/s_lrintl.c')
-rw-r--r--sysdeps/libm-ieee754/s_lrintl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/libm-ieee754/s_lrintl.c b/sysdeps/libm-ieee754/s_lrintl.c
index 8607851669..5a41427f72 100644
--- a/sysdeps/libm-ieee754/s_lrintl.c
+++ b/sysdeps/libm-ieee754/s_lrintl.c
@@ -34,7 +34,7 @@ long int
 __lrintl (long double x)
 {
   int32_t se,j0;
-  u_int32_t i0,i1,i;
+  u_int32_t i0, i1;
   long int result;
   volatile long double w;
   long double t;
@@ -70,7 +70,7 @@ __lrintl (long double x)
 	  GET_LDOUBLE_WORDS (se, i0, i1, t);
 	  j0 = (se & 0x7fff) - 0x3fff;
 
-	  result = ((long int) i0 << (j0 - 31)) | (j >> (63 - j0));
+	  result = ((long int) i0 << (j0 - 31)) | (i1 >> (63 - j0));
 	}
     }
   else