aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-08-06 23:04:48 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-08-06 23:04:48 +0300
commitfe8dd65bf28db1a6ad690ffcd5124d1863b5a4c6 (patch)
treebebe94fc30af8dcf35787e619febef093979c0ee /src
parent85829c973cb33592dbc0b0f3aaf9132f5dea6953 (diff)
downloadpostgresql-fe8dd65bf28db1a6ad690ffcd5124d1863b5a4c6.tar.gz
postgresql-fe8dd65bf28db1a6ad690ffcd5124d1863b5a4c6.zip
Mark misc static global variables as const
Reviewed-by: Andres Freund Discussion: https://www.postgresql.org/message-id/54c29fb0-edf2-48ea-9814-44e918bbd6e8@iki.fi
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlogprefetcher.c2
-rw-r--r--src/common/sha1.c2
-rw-r--r--src/pl/plpython/plpy_cursorobject.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlogprefetcher.c b/src/backend/access/transam/xlogprefetcher.c
index 84023d61baf..2dc2fb760a2 100644
--- a/src/backend/access/transam/xlogprefetcher.c
+++ b/src/backend/access/transam/xlogprefetcher.c
@@ -362,7 +362,7 @@ XLogPrefetcher *
XLogPrefetcherAllocate(XLogReaderState *reader)
{
XLogPrefetcher *prefetcher;
- static HASHCTL hash_table_ctl = {
+ const HASHCTL hash_table_ctl = {
.keysize = sizeof(RelFileLocator),
.entrysize = sizeof(XLogPrefetcherFilter)
};
diff --git a/src/common/sha1.c b/src/common/sha1.c
index 0525c4ff316..abfbd1c087d 100644
--- a/src/common/sha1.c
+++ b/src/common/sha1.c
@@ -61,7 +61,7 @@
#include "sha1_int.h"
/* constant table */
-static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
+static const uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
#define K(t) _K[(t) / 20]
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c
index 57e8f8ec217..24f2ac8c46b 100644
--- a/src/pl/plpython/plpy_cursorobject.c
+++ b/src/pl/plpython/plpy_cursorobject.c
@@ -27,7 +27,7 @@ static PyObject *PLy_cursor_iternext(PyObject *self);
static PyObject *PLy_cursor_fetch(PyObject *self, PyObject *args);
static PyObject *PLy_cursor_close(PyObject *self, PyObject *unused);
-static char PLy_cursor_doc[] = "Wrapper around a PostgreSQL cursor";
+static const char PLy_cursor_doc[] = "Wrapper around a PostgreSQL cursor";
static PyMethodDef PLy_cursor_methods[] = {
{"fetch", PLy_cursor_fetch, METH_VARARGS, NULL},