From df8b8968d4095f44acd6de03b4add65f9709b79d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 12 Dec 2022 14:33:41 +0100 Subject: Order getopt arguments Order the letters in the arguments of getopt() and getopt_long(), as well as in the subsequent switch statements. In most cases, I used alphabetical with lower case first. In a few cases, existing different orders (e.g., upper case first) was kept to reduce the diff size. Discussion: https://www.postgresql.org/message-id/flat/3efd0fe8-351b-f836-9122-886002602357%40enterprisedb.com --- src/bin/scripts/dropuser.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/bin/scripts/dropuser.c') diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c index 82c1f35ab23..d8c77cc8ffe 100644 --- a/src/bin/scripts/dropuser.c +++ b/src/bin/scripts/dropuser.c @@ -62,13 +62,19 @@ main(int argc, char *argv[]) handle_help_version_opts(argc, argv, "dropuser", help); - while ((c = getopt_long(argc, argv, "h:p:U:wWei", long_options, &optindex)) != -1) + while ((c = getopt_long(argc, argv, "eh:ip:U:wW", long_options, &optindex)) != -1) { switch (c) { + case 'e': + echo = true; + break; case 'h': host = pg_strdup(optarg); break; + case 'i': + interactive = true; + break; case 'p': port = pg_strdup(optarg); break; @@ -81,12 +87,6 @@ main(int argc, char *argv[]) case 'W': prompt_password = TRI_YES; break; - case 'e': - echo = true; - break; - case 'i': - interactive = true; - break; case 0: /* this covers the long options */ break; -- cgit v1.2.3