aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-10-31 10:34:31 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-11-10 13:38:57 -0500
commit0e1539ba0d0a43de06c6e0572a565e73b9472538 (patch)
treeae931d9955c9d6c91c8c85ee8c8e74e74bfb4612 /src/interfaces/libpq/fe-connect.c
parent7e60e678615b1f803ac73faee71cca79ec310d1d (diff)
downloadpostgresql-0e1539ba0d0a43de06c6e0572a565e73b9472538.tar.gz
postgresql-0e1539ba0d0a43de06c6e0572a565e73b9472538.zip
Add some const decorations to prototypes
Reviewed-by: Fabien COELHO <coelho@cri.ensmp.fr>
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index ada219032ec..2c175a2a24a 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -398,9 +398,9 @@ static int parseServiceFile(const char *serviceFile,
PQconninfoOption *options,
PQExpBuffer errorMessage,
bool *group_found);
-static char *pwdfMatchesString(char *buf, char *token);
-static char *passwordFromFile(char *hostname, char *port, char *dbname,
- char *username, char *pgpassfile);
+static char *pwdfMatchesString(char *buf, const char *token);
+static char *passwordFromFile(const char *hostname, const char *port, const char *dbname,
+ const char *username, const char *pgpassfile);
static void pgpassfileWarning(PGconn *conn);
static void default_threadlock(int acquire);
@@ -6329,10 +6329,10 @@ defaultNoticeProcessor(void *arg, const char *message)
* token doesn't match
*/
static char *
-pwdfMatchesString(char *buf, char *token)
+pwdfMatchesString(char *buf, const char *token)
{
- char *tbuf,
- *ttok;
+ char *tbuf;
+ const char *ttok;
bool bslash = false;
if (buf == NULL || token == NULL)
@@ -6366,8 +6366,8 @@ pwdfMatchesString(char *buf, char *token)
/* Get a password from the password file. Return value is malloc'd. */
static char *
-passwordFromFile(char *hostname, char *port, char *dbname,
- char *username, char *pgpassfile)
+passwordFromFile(const char *hostname, const char *port, const char *dbname,
+ const char *username, const char *pgpassfile)
{
FILE *fp;
struct stat stat_buf;