summaryrefslogtreecommitdiff
path: root/lib/libc/arch/sparc64
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2004-03-24 15:54:17 +0000
committerJason Wright <jason@cvs.openbsd.org>2004-03-24 15:54:17 +0000
commit3eb6413fb3cd82239bf1a67386fa999ad8af5e83 (patch)
treea8b528e9827d2ef21f761eec89c23a5d518336ef /lib/libc/arch/sparc64
parent6512f845bc65e8780006eeff666017c080fc2d1b (diff)
From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually makes sense. Any other bugs in here just ship in the release, I'm done.
Diffstat (limited to 'lib/libc/arch/sparc64')
-rw-r--r--lib/libc/arch/sparc64/fpu/fpu_explode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/sparc64/fpu/fpu_explode.c b/lib/libc/arch/sparc64/fpu/fpu_explode.c
index 64247f38e56..08d628f298f 100644
--- a/lib/libc/arch/sparc64/fpu/fpu_explode.c
+++ b/lib/libc/arch/sparc64/fpu/fpu_explode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_explode.c,v 1.3 2004/03/23 20:46:24 jason Exp $ */
+/* $OpenBSD: fpu_explode.c,v 1.4 2004/03/24 15:54:16 jason Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -130,7 +130,7 @@ __fpu_xtof(fp, i)
* fpu_norm()'s handling of `supernormals'; see fpu_subr.c.
*/
fp->fp_exp = FP_LG2;
- i = (i < 0) ? -i : i;
+ i = ((int64_t)i < 0) ? -i : i;
fp->fp_mant[0] = (i >> 32) & 0xffffffff;
fp->fp_mant[1] = (i >> 0) & 0xffffffff;
fp->fp_mant[2] = 0;