aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/decode.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-02-12 08:50:13 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-02-12 08:50:13 +0100
commit827b4060a8e35047c1adc9ca2ab3d8e7ad905df0 (patch)
tree1235f34ef0ea04f9ccb22dd8f9c648e0e9c3ed06 /src/backend/replication/logical/decode.c
parent506183bce73a2b22308a54876f0a56a249bc26e9 (diff)
downloadpostgresql-827b4060a8e35047c1adc9ca2ab3d8e7ad905df0.tar.gz
postgresql-827b4060a8e35047c1adc9ca2ab3d8e7ad905df0.zip
Remove unnecessary (char *) casts [mem]
Remove (char *) casts around memory functions such as memcmp(), memcpy(), or memset() where the cast is useless. Since these functions don't take char * arguments anyway, these casts are at best complicated casts to (void *), about which see commit 7f798aca1d5. Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
Diffstat (limited to 'src/backend/replication/logical/decode.c')
-rw-r--r--src/backend/replication/logical/decode.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 0bff0f10652..24d88f368d8 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -1177,9 +1177,7 @@ DecodeMultiInsert(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
memset(header, 0, SizeofHeapTupleHeader);
- memcpy((char *) tuple->t_data + SizeofHeapTupleHeader,
- (char *) data,
- datalen);
+ memcpy((char *) tuple->t_data + SizeofHeapTupleHeader, data, datalen);
header->t_infomask = xlhdr->t_infomask;
header->t_infomask2 = xlhdr->t_infomask2;
header->t_hoff = xlhdr->t_hoff;
@@ -1265,9 +1263,7 @@ DecodeXLogTuple(char *data, Size len, HeapTuple tuple)
tuple->t_tableOid = InvalidOid;
/* data is not stored aligned, copy to aligned storage */
- memcpy((char *) &xlhdr,
- data,
- SizeOfHeapHeader);
+ memcpy(&xlhdr, data, SizeOfHeapHeader);
memset(header, 0, SizeofHeapTupleHeader);