summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
authorBruce Momjian2013-05-29 20:58:43 +0000
committerBruce Momjian2013-05-29 20:58:43 +0000
commit9af4159fce6654aa0e081b00d02bca40b978745c (patch)
tree3aa507fc6cc67ed3d9f6ceec4d65d1e56cc08e1a /src/interfaces/libpq
parent07ab261ef3a9575a4a2bd3045b222d7b3dee2c46 (diff)
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/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-auth.c4
-rw-r--r--src/interfaces/libpq/fe-connect.c8
-rw-r--r--src/interfaces/libpq/fe-exec.c6
-rw-r--r--src/interfaces/libpq/fe-print.c3
-rw-r--r--src/interfaces/libpq/fe-protocol3.c2
-rw-r--r--src/interfaces/libpq/libpq-events.h2
6 files changed, 12 insertions, 13 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
index c8ff40ac5cb..5666a6b8dd8 100644
--- a/src/interfaces/libpq/fe-auth.c
+++ b/src/interfaces/libpq/fe-auth.c
@@ -244,7 +244,7 @@ pg_krb5_sendauth(PGconn *conn)
}
retval = krb5_sendauth(info.pg_krb5_context, &auth_context,
- (krb5_pointer) &conn->sock, (char *) conn->krbsrvname,
+ (krb5_pointer) & conn->sock, (char *) conn->krbsrvname,
info.pg_krb5_client, server,
AP_OPTS_MUTUAL_REQUIRED,
NULL, 0, /* no creds, use ccache instead */
@@ -285,7 +285,7 @@ pg_krb5_sendauth(PGconn *conn)
char sebuf[256];
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("could not restore nonblocking mode on socket: %s\n"),
+ libpq_gettext("could not restore nonblocking mode on socket: %s\n"),
pqStrerror(errno, sebuf, sizeof(sebuf)));
ret = STATUS_ERROR;
}
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index ae9dfaa0add..0d729c88b0c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -162,7 +162,7 @@ typedef struct _internalPQconninfoOption
* ---
*/
off_t connofs; /* Offset into PGconn struct, -1 if not there */
-} internalPQconninfoOption;
+} internalPQconninfoOption;
static const internalPQconninfoOption PQconninfoOptions[] = {
/*
@@ -389,7 +389,7 @@ pgthreadlock_t pg_g_threadlock = default_threadlock;
* pqDropConnection
*
* Close any physical connection to the server, and reset associated
- * state inside the connection object. We don't release state that
+ * state inside the connection object. We don't release state that
* would be needed to reconnect, though.
*/
void
@@ -1376,8 +1376,8 @@ connectDBStart(PGconn *conn)
{
appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"),
- portstr,
- (int) (UNIXSOCK_PATH_BUFLEN - 1));
+ portstr,
+ (int) (UNIXSOCK_PATH_BUFLEN - 1));
conn->options_valid = false;
goto connect_errReturn;
}
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 26c964e5c3c..5abccf443ed 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -1181,7 +1181,7 @@ PQsendQueryParams(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
@@ -1227,7 +1227,7 @@ PQsendPrepare(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
@@ -1322,7 +1322,7 @@ PQsendQueryPrepared(PGconn *conn,
if (nParams < 0 || nParams > 65535)
{
printfPQExpBuffer(&conn->errorMessage,
- libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
return 0;
}
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index b0fab6a839f..2fb4de36634 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -329,7 +329,6 @@ do_field(const PQprintOpt *po, const PGresult *res,
unsigned char *fieldNotNum, int *fieldMax,
const int fieldMaxLen, FILE *fout)
{
-
const char *pval,
*p;
int plen;
@@ -441,7 +440,6 @@ do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
const char **fieldNames, unsigned char *fieldNotNum,
const int fs_len, const PGresult *res)
{
-
int j; /* for loop index */
char *border = NULL;
@@ -528,7 +526,6 @@ output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
unsigned char *fieldNotNum, int *fieldMax, char *border,
const int row_index)
{
-
int field_index; /* for loop index */
if (po->html3)
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
index a7d4f40d38a..b6316803dd4 100644
--- a/src/interfaces/libpq/fe-protocol3.c
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -1467,6 +1467,7 @@ getCopyDataMessage(PGconn *conn)
case 'd': /* Copy Data, pass it back to caller */
return msgLength;
case 'c':
+
/*
* If this is a CopyDone message, exit COPY_OUT mode and let
* caller read status with PQgetResult(). If we're in
@@ -1478,6 +1479,7 @@ getCopyDataMessage(PGconn *conn)
conn->asyncStatus = PGASYNC_BUSY;
return -1;
default: /* treat as end of copy */
+
/*
* Any other message terminates either COPY_IN or COPY_BOTH
* mode.
diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h
index f05c873f724..44b3347eedf 100644
--- a/src/interfaces/libpq/libpq-events.h
+++ b/src/interfaces/libpq/libpq-events.h
@@ -24,7 +24,7 @@ extern "C"
#endif
/* Callback Event Ids */
- typedef enum
+typedef enum
{
PGEVT_REGISTER,
PGEVT_CONNRESET,