diff options
author | 2004-03-24 15:54:16 +0000 | |
---|---|---|
committer | 2004-03-24 15:54:16 +0000 | |
commit | f817f925cdec57e25fe76baf25460bec59aa6281 (patch) | |
tree | 9622430afd06537a948a9b71d2d8bceca7706d02 | |
parent | privsep documentation from canacar (diff) | |
download | wireguard-openbsd-f817f925cdec57e25fe76baf25460bec59aa6281.tar.xz wireguard-openbsd-f817f925cdec57e25fe76baf25460bec59aa6281.zip |
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.
-rw-r--r-- | lib/libc/arch/sparc64/fpu/fpu_explode.c | 4 |
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; |