diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2004-03-07 22:22:13 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2004-03-07 22:22:13 +0000 |
commit | 8c423a998e0c87de5060fffedc42871d14c3ea63 (patch) | |
tree | bb96883d9bb703d58d095462715b57f793895d57 /usr.bin/printf | |
parent | fcffa790e98402113286a22c64158f4b1a450ae6 (diff) | |
download | src-8c423a998e0c87de5060fffedc42871d14c3ea63.tar.gz src-8c423a998e0c87de5060fffedc42871d14c3ea63.zip |
Make it possible for the %[eEfgG] formats to not result in an error
being reported by /usr/bin/printf.
This bug has been around for 22 months... either nobody uses printf
with floating-point values, or people are forgetting to check their
return codes.
Approved by: rwatson (mentor)
Notes
Notes:
svn path=/head/; revision=126729
Diffstat (limited to 'usr.bin/printf')
-rw-r--r-- | usr.bin/printf/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index cc32e4f7c371..a99958e9f350 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -473,7 +473,7 @@ getdouble(double *dp) *dp = asciicode(); return (0); } - rval = 1; + rval = 0; errno = 0; *dp = strtod(*gargv, &ep); if (ep == *gargv) { |