\r
while (optind <= argc) \r
{\r
- string= memcached_get(memc, argv[argc], strlen(argv[argc]),\r
+ string= memcached_get(memc, argv[optind], strlen(argv[optind]),\r
&string_length, &flags, &rc);\r
if (rc == MEMCACHED_SUCCESS) \r
{\r
if (opt_displayflag)\r
{\r
if (opt_verbose)\r
- printf("key: %.*s\nflags: ", argv[argc]);\r
+ printf("key: %.*s\nflags: ", argv[optind]);\r
printf("%d\n", flags);\r
}\r
else \r
{\r
if (opt_verbose)\r
printf("key: %.*s\nflags: %d\nlength: %d\nvalue: ",\r
- argv[argc], flags, string_length);\r
+ argv[optind], flags, string_length);\r
printf("%.*s\n", string_length, string);\r
free(string);\r
}\r
else\r
{\r
fprintf(stderr, "memcat: %s: memcache error %s\n", \r
- argv[argc], memcached_strerror(memc, rc));\r
+ argv[optind], memcached_strerror(memc, rc));\r
}\r
optind++;\r
}\r