OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f321de9
)
avoid raising spurious division-by-zero exception in printf
author
Rich Felker
<dalias@aerifal.cx>
Fri, 19 Oct 2012 00:26:41 +0000
(20:26 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 19 Oct 2012 00:26:41 +0000
(20:26 -0400)
src/stdio/vfprintf.c
patch
|
blob
|
history
diff --git
a/src/stdio/vfprintf.c
b/src/stdio/vfprintf.c
index
6525938
..
4a2752b
100644
(file)
--- a/
src/stdio/vfprintf.c
+++ b/
src/stdio/vfprintf.c
@@
-200,7
+200,7
@@
static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t)
char ebuf0[3*sizeof(int)], *ebuf=&ebuf0[3*sizeof(int)], *estr;
pl=1;
- if (
y<0 || 1/y<0
) {
+ if (
signbit(y)
) {
y=-y;
} else if (fl & MARK_POS) {
prefix+=3;