Skip to content

Commit 885a4d3

Browse files
committed
Our version of getopt_long does not set optarg upon detecting an error, as
opposed to what other versions apparently do, so it's not safe to print an error message. Besides, getopt_long itself already did, so it's redundant anyway.
1 parent e970b2a commit 885a4d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/pg_ctl/pg_ctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.69 2006/06/18 15:38:37 petere Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.70 2006/06/25 04:37:55 alvherre Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -1608,7 +1608,7 @@ main(int argc, char **argv)
16081608
wait_set = true;
16091609
break;
16101610
default:
1611-
write_stderr(_("%s: invalid option %s\n"), progname, optarg);
1611+
/* getopt_long already issued a suitable error message */
16121612
do_advice();
16131613
exit(1);
16141614
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy