summaryrefslogtreecommitdiff
path: root/src/backend/libpq/pqcomm.c
diff options
context:
space:
mode:
authorAndres Freund2018-10-16 03:45:30 +0000
committerAndres Freund2018-10-16 04:01:14 +0000
commit62649bad831fb69b5d9644470acc413a35cddea6 (patch)
treee0d99a747615337e515290eb634c2f74fb2df2b6 /src/backend/libpq/pqcomm.c
parentc5257345ef61922468cd9abd887c3cb6c38792cb (diff)
Correct constness of a few variables.
This allows the compiler / linker to mark affected pages as read-only. There's other cases, but they're a bit more invasive, and should go through some review. These are easy. They were found with objdump -j .data -t src/backend/postgres|awk '{print $4, $5, $6}'|sort -r|less Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/libpq/pqcomm.c')
-rw-r--r--src/backend/libpq/pqcomm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index a4f6d4deeb4..0c9593d4cc9 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -170,7 +170,7 @@ static int Lock_AF_UNIX(char *unixSocketDir, char *unixSocketPath);
static int Setup_AF_UNIX(char *sock_path);
#endif /* HAVE_UNIX_SOCKETS */
-static PQcommMethods PqCommSocketMethods = {
+static const PQcommMethods PqCommSocketMethods = {
socket_comm_reset,
socket_flush,
socket_flush_if_writable,
@@ -181,7 +181,7 @@ static PQcommMethods PqCommSocketMethods = {
socket_endcopyout
};
-PQcommMethods *PqCommMethods = &PqCommSocketMethods;
+const PQcommMethods *PqCommMethods = &PqCommSocketMethods;
WaitEventSet *FeBeWaitSet;