diff options
author | Maciek Borzecki <maciek.borzecki@gmail.com> | 2010-03-16 12:41:29 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-17 10:25:29 +0100 |
commit | 46abfc0da14e5214fdf823edaf7643a9aa9eae65 (patch) | |
tree | ae4e7c5fff31fafcb20a78b08c40e8ac1bea0142 /networking | |
parent | 8d4a8d195ddcf34e5ff8a9602994ad6737f40df8 (diff) | |
download | busybox-46abfc0da14e5214fdf823edaf7643a9aa9eae65.tar.gz |
brctl: fix parsing of timespec to allow 0 (setfd, sethello..)
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/brctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/brctl.c b/networking/brctl.c index 57074cd73..77bb8f155 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -48,8 +48,9 @@ static ALWAYS_INLINE void strtotimeval(struct timeval *tv, { double secs; #if BRCTL_USE_INTERNAL - secs = /*bb_*/strtod(time_str, NULL); - if (!secs) + char *endptr; + secs = /*bb_*/strtod(time_str, &endptr); + if (endptr == time_str) #else if (sscanf(time_str, "%lf", &secs) != 1) #endif |