From 454c182f8542890d0e2eac85f70d9a254a34fce3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 23 Feb 2025 14:26:39 +0100 Subject: backend libpq void * argument for binary data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change some backend libpq functions to take void * for binary data instead of char *. This removes the need for numerous casts. Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org --- src/backend/utils/adt/varbit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/varbit.c') diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index 0071e026f01..205a67dafc5 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -361,7 +361,7 @@ bit_recv(PG_FUNCTION_ARGS) SET_VARSIZE(result, len); VARBITLEN(result) = bitlen; - pq_copymsgbytes(buf, (char *) VARBITS(result), VARBITBYTES(result)); + pq_copymsgbytes(buf, VARBITS(result), VARBITBYTES(result)); /* Make sure last byte is correctly zero-padded */ VARBIT_PAD(result); @@ -666,7 +666,7 @@ varbit_recv(PG_FUNCTION_ARGS) SET_VARSIZE(result, len); VARBITLEN(result) = bitlen; - pq_copymsgbytes(buf, (char *) VARBITS(result), VARBITBYTES(result)); + pq_copymsgbytes(buf, VARBITS(result), VARBITBYTES(result)); /* Make sure last byte is correctly zero-padded */ VARBIT_PAD(result); -- cgit v1.2.3