diff options
Diffstat (limited to '')
-rw-r--r-- | ch4/4-02_atof2.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/ch4/4-02_atof2.c b/ch4/4-02_atof2.c index 69c42fc..a70e881 100644 --- a/ch4/4-02_atof2.c +++ b/ch4/4-02_atof2.c @@ -19,13 +19,10 @@ double atof(char s[]) { double val, power; int i, sign, esign, exp; - /* Skip whitespace */ for (i = 0; isspace(s[i]); i++) { } - sign = (s[i] == '-') ? -1 : 1; - if (s[i] == '+' || s[i] == '-') { i++; } |