X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemcp.c;fp=clients%2Fmemcp.c;h=c748c40a6e11668f25e79dc2061fcd0c2633df9b;hb=5235340771e7b273b5f45d9f47283e23a956b0f1;hp=df3ca77e315e46fa205955fcd880c11eee697af3;hpb=99991f81c6ee295259bb59dab1dee928bc8710ac;p=awesomized%2Flibmemcached diff --git a/clients/memcp.c b/clients/memcp.c index df3ca77e..c748c40a 100644 --- a/clients/memcp.c +++ b/clients/memcp.c @@ -23,6 +23,10 @@ #include #include #include +#include +#include +#include + #include @@ -55,7 +59,7 @@ static long strtol_wrapper(const char *nptr, int base, bool *error) /* Check for various possible errors */ - if ((errno == ERANGE && (val == INTMAX_MAX || val == INTMAX_MIN)) + if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) || (errno != 0 && val == 0)) { *error= true;