[git commit master] brctl: fix parsing of timespec to allow 0 (setfd, sethello..)

Denys Vlasenko vda.linux at googlemail.com
Wed Mar 17 09:25:29 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=46abfc0da14e5214fdf823edaf7643a9aa9eae65
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Maciek Borzecki <maciek.borzecki at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/brctl.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/networking/brctl.c b/networking/brctl.c
index 57074cd..77bb8f1 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
-- 
1.6.3.3



More information about the busybox-cvs mailing list