X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Fstrntol.c;fp=lib%2Fstrntol.c;h=c3a55a117801f56fbe39a40e9b09327968cbc3e0;hb=a9d95828998ba65eff5a60df217d8d6ede6175bc;hp=f622c8dc22cebd9d2504d794de028f203bfab265;hpb=2f84d0c71475264d6e14d782ecb38f63a22bc3a7;p=fio.git diff --git a/lib/strntol.c b/lib/strntol.c index f622c8dc..c3a55a11 100644 --- a/lib/strntol.c +++ b/lib/strntol.c @@ -28,6 +28,6 @@ long strntol(const char *str, size_t sz, char **end, int base) if (ret == LONG_MIN || ret == LONG_MAX) return ret; if (end) - *end = (char *)str + (*end - buf); + *end = (char *)beg + (*end - buf); return ret; }