summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-09-03 08:00:38 +0200
committerPeter Eisentraut <peter@eisentraut.org>2024-09-03 08:06:03 +0200
commit2b5f57977f6d16796121d796835c48e4241b4da1 (patch)
tree995ebf254ffc97fa8f77dc16f3eb2fb0c3b6d252 /src/backend/access/transam/xact.c
parent4236825197e8b7f26f8fd2ce0ac287a696e7264e (diff)
Add const qualifiers to XLogRegister*() functions
Add const qualifiers to XLogRegisterData() and XLogRegisterBufData(). Several unconstify() calls can be removed. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/dd889784-9ce7-436a-b4f1-52e4a5e577bd@eisentraut.org
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 0fe1630fca8..87700c7c5c7 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -5951,7 +5951,7 @@ XactLogCommitRecord(TimestampTz commit_time,
{
XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
- XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
+ XLogRegisterData(twophase_gid, strlen(twophase_gid) + 1);
}
if (xl_xinfo.xinfo & XACT_XINFO_HAS_ORIGIN)
@@ -6097,7 +6097,7 @@ XactLogAbortRecord(TimestampTz abort_time,
{
XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
- XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
+ XLogRegisterData(twophase_gid, strlen(twophase_gid) + 1);
}
if (xl_xinfo.xinfo & XACT_XINFO_HAS_ORIGIN)