diff options
author | tjr <tjr@FreeBSD.org> | 2002-10-11 23:04:59 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-10-11 23:04:59 +0000 |
commit | 27cfe623e74b0ca223d83b1674d81ee0bc97efd5 (patch) | |
tree | 7eb6bf0d330ef98849a3e29be406eb8161f093c1 /lib | |
parent | 5bbd2d0ed6b041f154b1ddbd22369095feb74c35 (diff) | |
download | FreeBSD-src-27cfe623e74b0ca223d83b1674d81ee0bc97efd5.zip FreeBSD-src-27cfe623e74b0ca223d83b1674d81ee0bc97efd5.tar.gz |
Non-negative amounts should not have an extra space in front of them
when the `(' flag is used.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdlib/strfmon.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libc/stdlib/strfmon.c b/lib/libc/stdlib/strfmon.c index b74baf0..c0638fc 100644 --- a/lib/libc/stdlib/strfmon.c +++ b/lib/libc/stdlib/strfmon.c @@ -291,12 +291,8 @@ strfmon(char * __restrict s, size_t maxsize, const char * __restrict format, while (pad_size-- > 0) PRINT(' '); - if (sign_posn == 0) { - if (flags & IS_NEGATIVE) - PRINT('('); - else - PRINT(' '); - } + if (sign_posn == 0 && (flags & IS_NEGATIVE)) + PRINT('('); if (cs_precedes == 1) { if (sign_posn == 1 || sign_posn == 3) { |