From f6093386a8501ed6405a321557cfc7f35eeca8e3 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 353fde88..0d90fe32 100644 --- a/repmgr.c +++ b/repmgr.c @@ -255,7 +255,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); }