mirror of https://github.com/mirror/busybox.git
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>1_17_stable
parent
8d4a8d195d
commit
46abfc0da1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue