diff options
| author | Robert Haas <rhaas@postgresql.org> | 2012-09-06 15:43:46 -0400 |
|---|---|---|
| committer | Robert Haas <rhaas@postgresql.org> | 2012-09-06 15:52:07 -0400 |
| commit | 7e21ff3edb87ebd0575aa2e0e4fd7743c5a1af88 (patch) | |
| tree | b8bfd31e67553dd905ceffeb8a289565079c0bea /src | |
| parent | 1cd2d17ed746670c3a6f6dcb75c3d497676ef085 (diff) | |
Fix "too many arguments" messages not to index off the end of argv[].
This affects initdb, clusterdb, reindexdb, and vacuumdb in master
and 9.2; in earlier branches, only initdb is affected.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/initdb/initdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 0febcf1fcfb..9994d891d1f 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -2622,7 +2622,7 @@ main(int argc, char *argv[]) if (optind < argc) { fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"), - progname, argv[optind + 1]); + progname, argv[optind]); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); exit(1); |
