X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fbin%2Fmemtouch.cc;h=dbb9ad5ceeb0e79c30a1fe0b320c40979a10c960;hb=f2ab0a0c16503c35c23c6ad1ba11913d054ccdad;hp=1de4b92f67a45344a7dc5b677afae46d54a675e4;hpb=7c2da91b9897c54f66e7fc634a675fcaeef32167;p=awesomized%2Flibmemcached diff --git a/src/bin/memtouch.cc b/src/bin/memtouch.cc index 1de4b92f..dbb9ad5c 100644 --- a/src/bin/memtouch.cc +++ b/src/bin/memtouch.cc @@ -158,42 +158,64 @@ void options_parse(int argc, char *argv[]) { } switch (option_rv) { - case 0: break; + case 0: + break; - case OPT_BINARY: opt_binary = true; break; + case OPT_BINARY: + opt_binary = true; + break; - case OPT_VERBOSE: /* --verbose or -v */ opt_verbose = OPT_VERBOSE; break; + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; - case OPT_DEBUG: /* --debug or -d */ opt_verbose = OPT_DEBUG; break; + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; - case OPT_VERSION: /* --version or -V */ opt_version = true; break; + case OPT_VERSION: /* --version or -V */ + opt_version = true; + break; - case OPT_HELP: /* --help or -h */ opt_help = true; break; + case OPT_HELP: /* --help or -h */ + opt_help = true; + break; - case OPT_SERVERS: /* --servers or -s */ opt_servers = strdup(optarg); break; + case OPT_SERVERS: /* --servers or -s */ + opt_servers = strdup(optarg); + break; - case OPT_HASH: opt_hash = strdup(optarg); break; + case OPT_HASH: + opt_hash = strdup(optarg); + break; - case OPT_USERNAME: opt_username = optarg; break; + case OPT_USERNAME: + opt_username = optarg; + break; - case OPT_PASSWD: opt_passwd = optarg; break; + case OPT_PASSWD: + opt_passwd = optarg; + break; case OPT_EXPIRE: errno = 0; expiration = time_t(strtoul(optarg, (char **) NULL, 10)); - if (errno != 0) { + if (errno) { fprintf(stderr, "Invalid value for --expire: %s\n", optarg); exit(EXIT_FAILURE); } break; - case OPT_QUIET: close_stdio(); break; + case OPT_QUIET: + close_stdio(); + break; case '?': /* getopt_long already printed an error message. */ exit(EXIT_FAILURE); - default: abort(); + default: + abort(); } }