diff options
author | 2007-02-12 19:47:10 +0000 | |
---|---|---|
committer | 2007-02-12 19:47:10 +0000 | |
commit | 28a728455a3280e4548d78faeee886c1bce1c022 (patch) | |
tree | acf16d15fffc55f238d7e7b72042bac9275c1c0b /lib/libc | |
parent | Switch address and AS fields in mrt dump messages for incoming traffic so (diff) | |
download | wireguard-openbsd-28a728455a3280e4548d78faeee886c1bce1c022.tar.xz wireguard-openbsd-28a728455a3280e4548d78faeee886c1bce1c022.zip |
from FreeBSD via Jung (moorang at gmail), fix obvious typo in __fpu_ftox()
which caused all negative numbers returned to be == -1.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/sparc64/fpu/fpu_implode.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/arch/sparc64/fpu/fpu_implode.c b/lib/libc/arch/sparc64/fpu/fpu_implode.c index e835e9aa07e..bd01cf2f969 100644 --- a/lib/libc/arch/sparc64/fpu/fpu_implode.c +++ b/lib/libc/arch/sparc64/fpu/fpu_implode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu_implode.c,v 1.1 2003/07/21 18:41:30 jason Exp $ */ +/* $OpenBSD: fpu_implode.c,v 1.2 2007/02/12 19:47:10 jason Exp $ */ /* * Copyright (c) 1992, 1993 @@ -264,13 +264,13 @@ __fpu_ftox(fe, fp, res) case FPC_NUM: /* * If exp >= 2^64, overflow. Otherwise shift value right - * into last mantissa word (this will not exceed 0xffffffffffffffff), - * shifting any guard and round bits out into the sticky - * bit. Then ``round'' towards zero, i.e., just set an - * inexact exception if sticky is set (see round()). - * If the result is > 0x8000000000000000, or is positive and equals - * 0x8000000000000000, overflow; otherwise the last fraction word - * is the result. + * into last mantissa word (this will not exceed + * 0xffffffffffffffff), shifting any guard and round bits out + * into the sticky bit. Then ``round'' towards zero, i.e., + * just set an inexact exception if sticky is set (see round()). + * If the result is > 0x8000000000000000, or is positive and + * equals 0x8000000000000000, overflow; otherwise the + * last fraction word is the result. */ if ((exp = fp->fp_exp) >= 64) break; @@ -281,7 +281,7 @@ __fpu_ftox(fe, fp, res) if (i >= ((u_int64_t)0x8000000000000000LL + sign)) break; if (sign) - i = -1; + i = -i; res[1] = (int)i; return (i >> 32); |