diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2019-01-29 01:16:24 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2019-02-13 11:50:16 +0100 |
commit | 37d9916020286caec810f4de61fbd0de3568454d (patch) | |
tree | d9d80040f72093664d8a20b55de2a670988d281e /src/backend/libpq/auth.c | |
parent | cf40dc65b676c8df1ee12f060b40f0e37a183e04 (diff) | |
download | postgresql-37d9916020286caec810f4de61fbd0de3568454d.tar.gz postgresql-37d9916020286caec810f4de61fbd0de3568454d.zip |
More unconstify use
Replace casts whose only purpose is to cast away const with the
unconstify() macro.
Discussion: https://www.postgresql.org/message-id/flat/53a28052-f9f3-1808-fed9-460fd43035ab%402ndquadrant.com
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r-- | src/backend/libpq/auth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 20fe98fb826..c42f7b8fe6a 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -867,7 +867,7 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail) void *scram_opaq = NULL; char *output = NULL; int outputlen = 0; - char *input; + const char *input; int inputlen; int result; bool initial; @@ -964,14 +964,14 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail) if (inputlen == -1) input = NULL; else - input = (char *) pq_getmsgbytes(&buf, inputlen); + input = pq_getmsgbytes(&buf, inputlen); initial = false; } else { inputlen = buf.len; - input = (char *) pq_getmsgbytes(&buf, buf.len); + input = pq_getmsgbytes(&buf, buf.len); } pq_getmsgend(&buf); @@ -985,7 +985,7 @@ CheckSCRAMAuth(Port *port, char *shadow_pass, char **logdetail) * we pass 'logdetail' as NULL when doing a mock authentication, * because we should already have a better error message in that case */ - result = pg_be_scram_exchange(scram_opaq, input, inputlen, + result = pg_be_scram_exchange(scram_opaq, unconstify(char *, input), inputlen, &output, &outputlen, logdetail); @@ -2175,7 +2175,7 @@ CheckPAMAuth(Port *port, const char *user, const char *password) * later used inside the PAM conversation to pass the password to the * authentication module. */ - pam_passw_conv.appdata_ptr = (char *) password; /* from password above, + pam_passw_conv.appdata_ptr = unconstify(char *, password); /* from password above, * not allocated */ /* Optionally, one can set the service name in pg_hba.conf */ |