Our version of getopt_long does not set optarg upon detecting an error, as
authorAlvaro Herrera <[email protected]>
Sun, 25 Jun 2006 04:38:08 +0000 (04:38 +0000)
committerAlvaro Herrera <[email protected]>
Sun, 25 Jun 2006 04:38:08 +0000 (04:38 +0000)
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.

src/bin/pg_ctl/pg_ctl.c

index eff141fcb1067882dee2c4d2839c1093a35a6092..885eed23effe6d0a306632dc1ee8fcfde4161059 100644 (file)
@@ -1415,7 +1415,7 @@ main(int argc, char **argv)
                                        wait_set = true;
                                        break;
                                default:
-                                       write_stderr(_("%s: invalid option %s\n"), progname, optarg);
+                                       /* getopt_long already issued a suitable error message */
                                        do_advice();
                                        exit(1);
                        }