X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemstat.c;h=8e00775336f5d727ae8ecc0b7239a103d5a5659a;hb=b4de8d3fd063b9017797dd9809ab3acb8a537606;hp=952f091f931bc343d21ba7ddffa092f8411676c7;hpb=efa17fea71b96f27c95c1662cf03b3d5141d5a53;p=m6w6%2Flibmemcached diff --git a/clients/memstat.c b/clients/memstat.c index 952f091f..8e007753 100644 --- a/clients/memstat.c +++ b/clients/memstat.c @@ -35,19 +35,19 @@ static char *analyze_mode= NULL; static struct option long_options[]= { - {"version", no_argument, NULL, OPT_VERSION}, - {"help", no_argument, NULL, OPT_HELP}, - {"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, - {"debug", no_argument, &opt_verbose, OPT_DEBUG}, - {"servers", required_argument, NULL, OPT_SERVERS}, - {"flag", no_argument, &opt_displayflag, OPT_FLAG}, - {"analyze", optional_argument, NULL, OPT_ANALYZE}, + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {(OPTIONSTRING)"analyze", optional_argument, NULL, OPT_ANALYZE}, {0, 0, 0, 0}, }; int main(int argc, char *argv[]) { - memcached_return rc; + memcached_return_t rc; memcached_st *memc; memcached_stat_st *memc_stat; memcached_server_st *servers; @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) static void run_analyzer(memcached_st *memc, memcached_stat_st *memc_stat, memcached_server_st *server_list) { - memcached_return rc; + memcached_return_t rc; if (analyze_mode == NULL) { @@ -173,7 +173,7 @@ static void run_analyzer(memcached_st *memc, memcached_stat_st *memc_stat, if (elapsed_time > slowest_time) { - slowest_server= (long) x; + slowest_server= (long)x; slowest_time= elapsed_time; } @@ -219,7 +219,7 @@ static void print_server_listing(memcached_st *memc, memcached_stat_st *memc_sta memcached_server_st *server_list) { unsigned int x; - memcached_return rc; + memcached_return_t rc; printf("Listing %u Server\n\n", memcached_server_count(memc)); for (x= 0; x < memcached_server_count(memc); x++)