projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
099d030
)
Rework how we look at args.
author
Brian Aker
<brian@tangent.org>
Fri, 3 May 2013 09:40:41 +0000
(
05:40
-0400)
committer
Brian Aker
<brian@tangent.org>
Fri, 3 May 2013 09:40:41 +0000
(
05:40
-0400)
clients/memcp.cc
patch
|
blob
|
history
diff --git
a/clients/memcp.cc
b/clients/memcp.cc
index f3c3114106d8ea502f94f60bbe0aa49169702ae2..7986e24812d337c403dd9f52e6c2e7ad2192b2b0 100644
(file)
--- a/
clients/memcp.cc
+++ b/
clients/memcp.cc
@@
-85,6
+85,13
@@
int main(int argc, char *argv[])
{
options_parse(argc, argv);
+
+ if (optind >= argc)
+ {
+ fprintf(stderr, "Expected argument after options\n");
+ exit(EXIT_FAILURE);
+ }
+
initialize_sockets();
memcached_st *memc= memcached_create(NULL);
@@
-129,10
+136,12
@@
int main(int argc, char *argv[])
{
opt_servers= strdup(temp);
}
+#if 0
else if (argc >= 1 and argv[--argc])
{
opt_servers= strdup(argv[argc]);
}
+#endif
if (opt_servers == NULL)
{