diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-15 09:50:54 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-15 09:50:54 +0200 |
commit | 4813a5100d70385118ee23b0171e14bc61c81f30 (patch) | |
tree | ac753e330f1cab7ab0be5ea87dafbde4d9103e8e /coreutils | |
parent | cd3dd42c28832da92ee0d4d3afe7cf722e38f80c (diff) |
libbb: stop using bb_strtod for now
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/sleep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index de18dd0db..b16d03c2b 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -54,11 +54,13 @@ int sleep_main(int argc UNUSED_PARAM, char **argv) char *arg = *argv; if (strchr(arg, '.')) { double d; + char *pp; int len = strspn(arg, "0123456789."); char sv = arg[len]; arg[len] = '\0'; - d = bb_strtod(arg, NULL); - if (errno) + errno = 0; + d = strtod(arg, &pp); + if (errno || *pp) bb_show_usage(); arg[len] = sv; len--; |