mirror of
https://github.com/postgres/postgres.git
synced 2025-12-01 12:18:01 +03:00
More unconstify use
Replace casts whose only purpose is to cast away const with the unconstify() macro. Discussion: https://www.postgresql.org/message-id/flat/53a28052-f9f3-1808-fed9-460fd43035ab%402ndquadrant.com
This commit is contained in:
@@ -5409,7 +5409,7 @@ XactLogCommitRecord(TimestampTz commit_time,
|
||||
{
|
||||
XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
|
||||
if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
|
||||
XLogRegisterData((char *) twophase_gid, strlen(twophase_gid) + 1);
|
||||
XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
|
||||
}
|
||||
|
||||
if (xl_xinfo.xinfo & XACT_XINFO_HAS_ORIGIN)
|
||||
@@ -5537,7 +5537,7 @@ XactLogAbortRecord(TimestampTz abort_time,
|
||||
{
|
||||
XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
|
||||
if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
|
||||
XLogRegisterData((char *) twophase_gid, strlen(twophase_gid) + 1);
|
||||
XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
|
||||
}
|
||||
|
||||
if (xl_xinfo.xinfo & XACT_XINFO_HAS_ORIGIN)
|
||||
|
||||
Reference in New Issue
Block a user