X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=lib%2Fstrntol.c;h=c3a55a117801f56fbe39a40e9b09327968cbc3e0;hp=adf45bd4d6b87996b63eaaf3d50641bd8f431873;hb=5ddf46d0b2dfe10b9a518db1f936c81e099b2646;hpb=7903bf87725b18495a06f7199342f167147712eb diff --git a/lib/strntol.c b/lib/strntol.c index adf45bd4..c3a55a11 100644 --- a/lib/strntol.c +++ b/lib/strntol.c @@ -2,7 +2,7 @@ #include #include -#include "lib/strntol.h" +#include "strntol.h" long strntol(const char *str, size_t sz, char **end, int base) { @@ -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; }