From 95ec0450da5f55018b7d139048037a3d54161537 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Thu, 30 Aug 2012 02:11:48 -0500 Subject: [PATCH] When we have more command-line arguments than we should have we need to show that last value and we should use only optind for that instead of optind+1 --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 68e5db16..be5ca394 100644 --- a/repmgr.c +++ b/repmgr.c @@ -269,7 +269,7 @@ main(int argc, char **argv) break; default: log_err(_("%s: too many command-line arguments (first extra is \"%s\")\n"), - progname, argv[optind + 1]); + progname, argv[optind]); usage(); exit(ERR_BAD_CONFIG); }