aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/be-secure-common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-04-26 14:45:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-04-26 14:45:04 -0400
commitf83bf385c1dad4964e0d899174989a1668536182 (patch)
treedf1768e40b4d518f7e80558200d2ed03dc2c91f3 /src/backend/libpq/be-secure-common.c
parenta0854f10722b20a445f5e67a357bd8809b32f540 (diff)
downloadpostgresql-f83bf385c1dad4964e0d899174989a1668536182.tar.gz
postgresql-f83bf385c1dad4964e0d899174989a1668536182.zip
Preliminary work for pgindent run.
Update typedefs.list from current buildfarm results. Adjust pgindent's typedef blacklist to block some more unfortunate typedef names that have snuck in since last time. Manually tweak a few places where I didn't like the initial results of pgindent'ing.
Diffstat (limited to 'src/backend/libpq/be-secure-common.c')
-rw-r--r--src/backend/libpq/be-secure-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/be-secure-common.c b/src/backend/libpq/be-secure-common.c
index 46f0b5f4a32..2389e5668f2 100644
--- a/src/backend/libpq/be-secure-common.c
+++ b/src/backend/libpq/be-secure-common.c
@@ -114,8 +114,8 @@ run_ssl_passphrase_command(const char *prompt, bool is_server_start, char *buf,
/* strip trailing newline */
len = strlen(buf);
- if (buf[len - 1] == '\n')
- buf[len-- -1] = '\0';
+ if (len > 0 && buf[len - 1] == '\n')
+ buf[--len] = '\0';
error:
pfree(command.data);