summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-05-22 12:55:34 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-05-22 12:55:34 -0400
commitbe76af171cdb3e7465c4ef234af403f97ad79b7b (patch)
tree1fa62d2b7a6680a4237a1548f7002fa0b234b143 /src/interfaces/libpq
parent66a4bad83aaa6613a45a00a488c04427f9969fb4 (diff)
downloadpostgresql-be76af171cdb3e7465c4ef234af403f97ad79b7b.tar.gz
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent. I thought it would be good to commit this separately, so as to document the differences between 2.0 and 2.1 behavior. Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-connect.c3
-rw-r--r--src/interfaces/libpq/libpq-fe.h2
-rw-r--r--src/interfaces/libpq/pqexpbuffer.c7
3 files changed, 7 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index b89df08c29..d3bcb98275 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -313,7 +313,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
* and "prefer".
*/
{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
- "GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */
+ "GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */
offsetof(struct pg_conn, gssencmode)},
#if defined(ENABLE_GSS) || defined(ENABLE_SSPI)
@@ -2420,6 +2420,7 @@ keep_going: /* We will come back to here until there is
getHostaddr(conn, host_addr, NI_MAXHOST);
if (strlen(host_addr) > 0)
conn->connip = strdup(host_addr);
+
/*
* purposely ignore strdup failure; not a big problem if
* it fails anyway.
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index f44030b4b0..54c951723c 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -349,7 +349,7 @@ extern void PQinitSSL(int do_init);
extern void PQinitOpenSSL(int do_ssl, int do_crypto);
/* Return true if GSSAPI encryption is in use */
-extern int PQgssEncInUse(PGconn *conn);
+extern int PQgssEncInUse(PGconn *conn);
/* Returns GSSAPI context if GSSAPI is in use */
extern void *PQgetgssctx(PGconn *conn);
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
index dc7c3ea07d..b3c53b0cda 100644
--- a/src/interfaces/libpq/pqexpbuffer.c
+++ b/src/interfaces/libpq/pqexpbuffer.c
@@ -36,8 +36,9 @@
/* All "broken" PQExpBuffers point to this string. */
static const char oom_buffer[1] = "";
+
/* Need a char * for unconstify() compatiblity */
-static const char * oom_buffer_ptr = oom_buffer;
+static const char *oom_buffer_ptr = oom_buffer;
static bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
@@ -93,7 +94,7 @@ initPQExpBuffer(PQExpBuffer str)
str->data = (char *) malloc(INITIAL_EXPBUFFER_SIZE);
if (str->data == NULL)
{
- str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
+ str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
str->maxlen = 0;
str->len = 0;
}
@@ -132,7 +133,7 @@ termPQExpBuffer(PQExpBuffer str)
if (str->data != oom_buffer)
free(str->data);
/* just for luck, make the buffer validly empty. */
- str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
+ str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
str->maxlen = 0;
str->len = 0;
}