diff options
| author | Jens Schweikhardt <schweikh@FreeBSD.org> | 2002-08-27 20:11:08 +0000 |
|---|---|---|
| committer | Jens Schweikhardt <schweikh@FreeBSD.org> | 2002-08-27 20:11:08 +0000 |
| commit | 3dd657600a9690cb262fac4a8781c14bd6eae786 (patch) | |
| tree | 65fdc6ccfc7daabbf34b98094d23dfc7077bf6d4 /lib/libc/stdio/vfprintf.c | |
| parent | 3c94f41f51a055058d81e0e10667a67ec380f878 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/vfprintf.c')
| -rw-r--r-- | lib/libc/stdio/vfprintf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 91bbe00dfbb1..1802fc7a0874 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -1409,13 +1409,8 @@ cvt(double value, int ndigits, int flags, char *sign, int *decpt, ndigits++; mode = 2; /* ndigits significant digits */ } - if (value < 0) { - value = -value; - *sign = '-'; - } else - *sign = '\000'; - digits = __dtoa(value, mode, ndigits, decpt, &dsgn, &rve, - dtoaresultp); + digits = __dtoa(value, mode, ndigits, decpt, &dsgn, &rve, dtoaresultp); + *sign = dsgn != 0; if ((ch != 'g' && ch != 'G') || flags & ALT) { /* print trailing zeros */ bp = digits + ndigits; |
