diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 5 | ||||
-rw-r--r-- | src/bin/psql/startup.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 9045e00a1db..9e909ae77d1 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -2002,13 +2002,12 @@ main(int argc, char **argv) /* support --help and --version even if invoked as root */ if (argc > 1) { - if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0 || - strcmp(argv[1], "-?") == 0) + if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) { do_help(); exit(0); } - else if (strcmp(argv[1], "-V") == 0 || strcmp(argv[1], "--version") == 0) + else if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0) { puts("pg_ctl (PostgreSQL) " PG_VERSION); exit(0); diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 1c9f7a568a1..b2264c91fac 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -558,7 +558,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options) break; case '?': /* Actual help option given */ - if (strcmp(argv[optind - 1], "-?") == 0 || strcmp(argv[optind - 1], "--help") == 0) + if (strcmp(argv[optind - 1], "--help") == 0 || strcmp(argv[optind - 1], "-?") == 0) { usage(); exit(EXIT_SUCCESS); |