X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fmemstat.c;h=540d3f4fe27c0349d8da1aa92993e0e7360035e9;hb=53034e4b367749c1a4e3771dd85ed27bd3b701cf;hp=40aade209435daa74e62e3845d5948e6b3cbf4eb;hpb=a839a04ae135e6a92b8be858e9c6605d7514c394;p=awesomized%2Flibmemcached diff --git a/src/memstat.c b/src/memstat.c index 40aade20..540d3f4f 100644 --- a/src/memstat.c +++ b/src/memstat.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include @@ -39,7 +41,10 @@ int main(int argc, char *argv[]) if ((temp= getenv("MEMCACHED_SERVERS"))) opt_servers= strdup(temp); else + { + fprintf(stderr, "No Servers provided\n"); exit(1); + } } memc= memcached_create(NULL); @@ -50,7 +55,7 @@ int main(int argc, char *argv[]) stat= memcached_stat(memc, NULL, &rc); - if (rc != MEMCACHED_SUCCESS && rc == MEMCACHED_SOME_ERRORS) + if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_SOME_ERRORS) { printf("Failure to communicate with servers (%s)\n", memcached_strerror(memc, rc));