Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f98d8d5
)
Fix "too many arguments" messages not to index off the end of argv[].
author
Robert Haas
<rhaas@postgresql.org>
Thu, 6 Sep 2012 19:43:46 +0000
(15:43 -0400)
committer
Robert Haas
<rhaas@postgresql.org>
Thu, 6 Sep 2012 19:52:04 +0000
(15:52 -0400)
This affects initdb, clusterdb, reindexdb, and vacuumdb in master
and 9.2; in earlier branches, only initdb is affected.
src/bin/initdb/initdb.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/initdb/initdb.c
b/src/bin/initdb/initdb.c
index 32d47d8fc99eed5fe8eed746c8f738b47e78d4cc..5f6e1d6e07721c4c5b28f624f14c60f76ead6c7a 100644
(file)
--- a/
src/bin/initdb/initdb.c
+++ b/
src/bin/initdb/initdb.c
@@
-2571,7
+2571,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);