diff options
-rw-r--r-- | lib/libm/src/s_lrint.c | 10 | ||||
-rw-r--r-- | lib/libm/src/s_lrintf.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libm/src/s_lrint.c b/lib/libm/src/s_lrint.c index fdfdd2b7d87..fd9bc1e7a0a 100644 --- a/lib/libm/src/s_lrint.c +++ b/lib/libm/src/s_lrint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_lrint.c,v 1.3 2011/04/10 11:35:01 martynas Exp $ */ +/* $OpenBSD: s_lrint.c,v 1.4 2011/04/10 20:42:09 martynas Exp $ */ /* $NetBSD: lrint.c,v 1.3 2004/10/13 15:18:32 drochner Exp $ */ /*- @@ -82,14 +82,14 @@ LRINTNAME(double x) shift = e - DBL_FRACBITS; if (shift >=0) - res = (shift < 32 ? (RESTYPE)i1 << shift : 0); + res = (shift < RESTYPE_BITS ? (RESTYPE)i1 << shift : 0); else - res = (shift > -32 ? i1 >> -shift : 0); + res = (shift > -RESTYPE_BITS ? i1 >> -shift : 0); shift += 32; if (shift >=0) - res |= (shift < 32 ? (RESTYPE)i0 << shift : 0); + res |= (shift < RESTYPE_BITS ? (RESTYPE)i0 << shift : 0); else - res |= (shift > -32 ? i0 >> -shift : 0); + res |= (shift > -RESTYPE_BITS ? i0 >> -shift : 0); return (s ? -res : res); } diff --git a/lib/libm/src/s_lrintf.c b/lib/libm/src/s_lrintf.c index d86f2bb9eb4..5844909a4c6 100644 --- a/lib/libm/src/s_lrintf.c +++ b/lib/libm/src/s_lrintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_lrintf.c,v 1.2 2011/04/10 11:25:14 martynas Exp $ */ +/* $OpenBSD: s_lrintf.c,v 1.3 2011/04/10 20:42:09 martynas Exp $ */ /* $NetBSD: lrintf.c,v 1.3 2004/10/13 15:18:32 drochner Exp $ */ /*- @@ -84,9 +84,9 @@ LRINTNAME(float x) shift = e - SNG_FRACBITS; if (shift >=0) - res = (shift < 32 ? (RESTYPE)i0 << shift : 0); + res = (shift < RESTYPE_BITS ? (RESTYPE)i0 << shift : 0); else - res = (shift > -32 ? i0 >> -shift : 0); + res = (shift > -RESTYPE_BITS ? i0 >> -shift : 0); return (s ? -res : res); } |