diff options
author | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2013-05-29 16:58:43 -0400 |
commit | 9af4159fce6654aa0e081b00d02bca40b978745c (patch) | |
tree | 3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/bin/scripts/pg_isready.c | |
parent | 07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff) | |
download | postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.tar.gz postgresql-9af4159fce6654aa0e081b00d02bca40b978745c.zip |
pgindent run for release 9.3
This is the first run of the Perl-based pgindent script. Also update
pgindent instructions.
Diffstat (limited to 'src/bin/scripts/pg_isready.c')
-rw-r--r-- | src/bin/scripts/pg_isready.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/bin/scripts/pg_isready.c b/src/bin/scripts/pg_isready.c index 4ba257d06ed..89542db2300 100644 --- a/src/bin/scripts/pg_isready.c +++ b/src/bin/scripts/pg_isready.c @@ -12,15 +12,17 @@ #include "postgres_fe.h" #include "common.h" -#define DEFAULT_CONNECT_TIMEOUT "3" +#define DEFAULT_CONNECT_TIMEOUT "3" static void -help(const char *progname); + help(const char *progname); int main(int argc, char **argv) { - int c,optindex,opt_index = 2; + int c, + optindex, + opt_index = 2; const char *progname; @@ -30,28 +32,29 @@ main(int argc, char **argv) const char *pgdbname = NULL; const char *connect_timeout = DEFAULT_CONNECT_TIMEOUT; - const char *keywords[7] = { NULL }; - const char *values[7] = { NULL }; + const char *keywords[7] = {NULL}; + const char *values[7] = {NULL}; - bool quiet = false; + bool quiet = false; - PGPing rv; - PQconninfoOption *connect_options, *conn_opt_ptr; + PGPing rv; + PQconninfoOption *connect_options, + *conn_opt_ptr; /* - * We accept user and database as options to avoid - * useless errors from connecting with invalid params + * We accept user and database as options to avoid useless errors from + * connecting with invalid params */ static struct option long_options[] = { - {"dbname", required_argument, NULL, 'd'}, - {"host", required_argument, NULL, 'h'}, - {"port", required_argument, NULL, 'p'}, - {"quiet", no_argument, NULL, 'q'}, - {"timeout", required_argument, NULL, 't'}, - {"username", required_argument, NULL, 'U'}, - {NULL, 0, NULL, 0} - }; + {"dbname", required_argument, NULL, 'd'}, + {"host", required_argument, NULL, 'h'}, + {"port", required_argument, NULL, 'p'}, + {"quiet", no_argument, NULL, 'q'}, + {"timeout", required_argument, NULL, 't'}, + {"username", required_argument, NULL, 'U'}, + {NULL, 0, NULL, 0} + }; progname = get_progname(argv[0]); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pgscripts")); @@ -81,6 +84,7 @@ main(int argc, char **argv) break; default: fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); + /* * We need to make sure we don't return 1 here because someone * checking the return code might infer unintended meaning @@ -94,6 +98,7 @@ main(int argc, char **argv) fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"), progname, argv[optind]); fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname); + /* * We need to make sure we don't return 1 here because someone * checking the return code might infer unintended meaning |