projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d4a8d1
)
brctl: fix parsing of timespec to allow 0 (setfd, sethello..)
author
Maciek Borzecki
<maciek.borzecki@gmail.com>
Tue, 16 Mar 2010 11:41:29 +0000
(12:41 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 17 Mar 2010 09:25:29 +0000
(10:25 +0100)
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/brctl.c
patch
|
blob
|
history
diff --git
a/networking/brctl.c
b/networking/brctl.c
index 57074cd738b8a1e81a303daced06ef2f6ff6e8b5..77bb8f155b0095a6246767135cd14d05213e1ad2 100644
(file)
--- 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