aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq')
-rw-r--r--src/interfaces/libpq/fe-connect.c2
-rw-r--r--src/interfaces/libpq/fe-exec.c22
-rw-r--r--src/interfaces/libpq/fe-secure-common.h4
-rw-r--r--src/interfaces/libpq/fe-secure-openssl.c4
-rw-r--r--src/interfaces/libpq/libpq-fe.h4
5 files changed, 18 insertions, 18 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 917b19e0e9d..746e9b4f1ef 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -381,7 +381,7 @@ static void closePGconn(PGconn *conn);
static void release_conn_addrinfo(PGconn *conn);
static void sendTerminateConn(PGconn *conn);
static PQconninfoOption *conninfo_init(PQExpBuffer errorMessage);
-static PQconninfoOption *parse_connection_string(const char *conninfo,
+static PQconninfoOption *parse_connection_string(const char *connstr,
PQExpBuffer errorMessage, bool use_defaults);
static int uri_prefix_length(const char *connstr);
static bool recognized_connection_string(const char *connstr);
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index bb874f7f509..97f6894244d 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -2808,12 +2808,12 @@ PQgetCopyData(PGconn *conn, char **buffer, int async)
* PQgetline - gets a newline-terminated string from the backend.
*
* Chiefly here so that applications can use "COPY <rel> to stdout"
- * and read the output string. Returns a null-terminated string in s.
+ * and read the output string. Returns a null-terminated string in `buffer`.
*
* XXX this routine is now deprecated, because it can't handle binary data.
* If called during a COPY BINARY we return EOF.
*
- * PQgetline reads up to maxlen-1 characters (like fgets(3)) but strips
+ * PQgetline reads up to `length`-1 characters (like fgets(3)) but strips
* the terminating \n (like gets(3)).
*
* CAUTION: the caller is responsible for detecting the end-of-copy signal
@@ -2824,23 +2824,23 @@ PQgetCopyData(PGconn *conn, char **buffer, int async)
* 0 if EOL is reached (i.e., \n has been read)
* (this is required for backward-compatibility -- this
* routine used to always return EOF or 0, assuming that
- * the line ended within maxlen bytes.)
+ * the line ended within `length` bytes.)
* 1 in other cases (i.e., the buffer was filled before \n is reached)
*/
int
-PQgetline(PGconn *conn, char *s, int maxlen)
+PQgetline(PGconn *conn, char *buffer, int length)
{
- if (!s || maxlen <= 0)
+ if (!buffer || length <= 0)
return EOF;
- *s = '\0';
- /* maxlen must be at least 3 to hold the \. terminator! */
- if (maxlen < 3)
+ *buffer = '\0';
+ /* length must be at least 3 to hold the \. terminator! */
+ if (length < 3)
return EOF;
if (!conn)
return EOF;
- return pqGetline3(conn, s, maxlen);
+ return pqGetline3(conn, buffer, length);
}
/*
@@ -2892,9 +2892,9 @@ PQgetlineAsync(PGconn *conn, char *buffer, int bufsize)
* send failure.
*/
int
-PQputline(PGconn *conn, const char *s)
+PQputline(PGconn *conn, const char *string)
{
- return PQputnbytes(conn, s, strlen(s));
+ return PQputnbytes(conn, string, strlen(string));
}
/*
diff --git a/src/interfaces/libpq/fe-secure-common.h b/src/interfaces/libpq/fe-secure-common.h
index d18db7138cc..415a93898f7 100644
--- a/src/interfaces/libpq/fe-secure-common.h
+++ b/src/interfaces/libpq/fe-secure-common.h
@@ -22,8 +22,8 @@ extern int pq_verify_peer_name_matches_certificate_name(PGconn *conn,
const char *namedata, size_t namelen,
char **store_name);
extern int pq_verify_peer_name_matches_certificate_ip(PGconn *conn,
- const unsigned char *addrdata,
- size_t addrlen,
+ const unsigned char *ipdata,
+ size_t iplen,
char **store_name);
extern bool pq_verify_peer_name_matches_certificate(PGconn *conn);
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index 3798bb3f11c..aea4661736c 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -68,14 +68,14 @@
static int verify_cb(int ok, X509_STORE_CTX *ctx);
static int openssl_verify_peer_name_matches_certificate_name(PGconn *conn,
- ASN1_STRING *name,
+ ASN1_STRING *name_entry,
char **store_name);
static int openssl_verify_peer_name_matches_certificate_ip(PGconn *conn,
ASN1_OCTET_STRING *addr_entry,
char **store_name);
static void destroy_ssl_system(void);
static int initialize_SSL(PGconn *conn);
-static PostgresPollingStatusType open_client_SSL(PGconn *);
+static PostgresPollingStatusType open_client_SSL(PGconn *conn);
static char *SSLerrmessage(unsigned long ecode);
static void SSLerrfree(char *buf);
static int PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata);
diff --git a/src/interfaces/libpq/libpq-fe.h b/src/interfaces/libpq/libpq-fe.h
index 7986445f1a9..b7df3224c0f 100644
--- a/src/interfaces/libpq/libpq-fe.h
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -483,7 +483,7 @@ extern int PQputCopyEnd(PGconn *conn, const char *errormsg);
extern int PQgetCopyData(PGconn *conn, char **buffer, int async);
/* Deprecated routines for copy in/out */
-extern int PQgetline(PGconn *conn, char *string, int length);
+extern int PQgetline(PGconn *conn, char *buffer, int length);
extern int PQputline(PGconn *conn, const char *string);
extern int PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
extern int PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
@@ -591,7 +591,7 @@ extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_lengt
extern void PQprint(FILE *fout, /* output stream */
const PGresult *res,
- const PQprintOpt *ps); /* option structure */
+ const PQprintOpt *po); /* option structure */
/*
* really old printing routines