From: Mark Atwood Date: Wed, 19 Sep 2007 12:06:52 +0000 (-0700) Subject: fix to dont lose the last item on the command line X-Git-Tag: 0.2~18^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9d680137c6998e03c6f091d83bcd01a616b42889;p=m6w6%2Flibmemcached fix to dont lose the last item on the command line --- diff --git a/src/memcat.c b/src/memcat.c index eb853291..5022dd9b 100644 --- a/src/memcat.c +++ b/src/memcat.c @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) memc= memcached_init(NULL); memc= parse_opt_servers(memc, opt_servers); - while (optind < argc) { + while (optind <= argc) { string= memcached_get(memc, argv[optind], strlen(argv[optind]), &string_length, &flags, &rc); if (rc == MEMCACHED_SUCCESS) { diff --git a/src/memcp.c b/src/memcp.c index 7f49d4da..b259c698 100644 --- a/src/memcp.c +++ b/src/memcp.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) memc= memcached_init(NULL); memc= parse_opt_servers(memc, opt_servers); - while (optind < argc) { + while (optind <= argc) { char *mptr; struct stat sbuf; int fd;