X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstdlib%2Fstrtod.c;h=a5d0118a2dc6e58ec06e5bb5bfc1313c62d06d20;hb=cab0a8fb8d9a1095de3e4c2227bfc37fae93f781;hp=a898b1d421867146ac662e512894e4a67f6486c2;hpb=5ce3737931bb411a8d167356d4d0287b53b0cbdc;p=musl diff --git a/src/stdlib/strtod.c b/src/stdlib/strtod.c index a898b1d4..a5d0118a 100644 --- a/src/stdlib/strtod.c +++ b/src/stdlib/strtod.c @@ -5,10 +5,8 @@ static long double strtox(const char *s, char **p, int prec) { - FILE f = { - .buf = (void *)s, .rpos = (void *)s, - .rend = (void *)-1, .lock = -1 - }; + FILE f; + sh_fromstring(&f, s); shlim(&f, 0); long double y = __floatscan(&f, prec, 1); off_t cnt = shcnt(&f);