projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fixed all warnings in code.
[m6w6/libmemcached]
/
src
/
memstat.c
diff --git
a/src/memstat.c
b/src/memstat.c
index 76fdd9c6dde3e308d3bbaedf0f4a8b3c409ff76b..e7810200db7736f721f7380e57a8c6ed0dc14704 100644
(file)
--- a/
src/memstat.c
+++ b/
src/memstat.c
@@
-34,7
+34,7
@@
int main(int argc, char *argv[])
void options_parse(int argc, char *argv[])
{
void options_parse(int argc, char *argv[])
{
- static struct option long_options[]
=
+ static struct option long_options[]=
{
{"version", no_argument, NULL, OPT_VERSION},
{"help", no_argument, NULL, OPT_HELP},
{
{"version", no_argument, NULL, OPT_VERSION},
{"help", no_argument, NULL, OPT_HELP},
@@
-45,26
+45,27
@@
void options_parse(int argc, char *argv[])
{0, 0, 0, 0},
};
{0, 0, 0, 0},
};
- int option_index
= 0;
+ int option_index= 0;
int option_rv;
while (1)
{
int option_rv;
while (1)
{
- option_rv
= getopt_long(argc, argv, "
", long_options, &option_index);
+ option_rv
= getopt_long(argc, argv, "Vhvds:
", long_options, &option_index);
if (option_rv == -1) break;
if (option_rv == -1) break;
- switch (option_rv) {
+ switch (option_rv)
+ {
case 0:
break;
case 0:
break;
- case OPT_VERSION: /* --version */
+ case OPT_VERSION: /* --version
or -V
*/
printf("memcache tools, memcat, v1.0\n");
exit(0);
break;
printf("memcache tools, memcat, v1.0\n");
exit(0);
break;
- case OPT_HELP: /* --help */
+ case OPT_HELP: /* --help
or -h
*/
printf("useful help messages go here\n");
exit(0);
break;
printf("useful help messages go here\n");
exit(0);
break;
- case OPT_SERVERS: /* --servers */
- opt_servers
= optarg;
+ case OPT_SERVERS: /* --servers
or -s
*/
+ opt_servers= optarg;
break;
case '?':
/* getopt_long already printed an error message. */
break;
case '?':
/* getopt_long already printed an error message. */