diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-05-22 12:55:34 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-05-22 12:55:34 -0400 |
commit | be76af171cdb3e7465c4ef234af403f97ad79b7b (patch) | |
tree | 1fa62d2b7a6680a4237a1548f7002fa0b234b143 /src/interfaces/libpq/pqexpbuffer.c | |
parent | 66a4bad83aaa6613a45a00a488c04427f9969fb4 (diff) |
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/pqexpbuffer.c')
-rw-r--r-- | src/interfaces/libpq/pqexpbuffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/libpq/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c index dc7c3ea07d4..b3c53b0cda3 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; } |