mirror of
git://git.musl-libc.org/musl
synced 2025-04-23 07:26:10 +00:00
remove redundant (unmaintained) check in floatscan
also be extra careful to avoid wrapping the circular buffer early
This commit is contained in:
parent
3f4de355ba
commit
02eb568ded
@ -89,7 +89,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
|
|||||||
if (gotrad) break;
|
if (gotrad) break;
|
||||||
gotrad = 1;
|
gotrad = 1;
|
||||||
lrp = dc;
|
lrp = dc;
|
||||||
} else if (k < KMAX-2) {
|
} else if (k < KMAX-3) {
|
||||||
dc++;
|
dc++;
|
||||||
if (c!='0') lnz = dc;
|
if (c!='0') lnz = dc;
|
||||||
if (j) x[k] = x[k]*10 + c-'0';
|
if (j) x[k] = x[k]*10 + c-'0';
|
||||||
@ -101,7 +101,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
|
|||||||
gotdig=1;
|
gotdig=1;
|
||||||
} else {
|
} else {
|
||||||
dc++;
|
dc++;
|
||||||
if (c!='0') x[KMAX-3] |= 1;
|
if (c!='0') x[KMAX-4] |= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!gotrad) lrp=dc;
|
if (!gotrad) lrp=dc;
|
||||||
@ -143,7 +143,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Align incomplete final B1B digit */
|
/* Align incomplete final B1B digit */
|
||||||
if (k<KMAX && j) {
|
if (j) {
|
||||||
for (; j<9; j++) x[k]*=10;
|
for (; j<9; j++) x[k]*=10;
|
||||||
k++;
|
k++;
|
||||||
j=0;
|
j=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user