aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/array_userfuncs.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-02-14 13:32:19 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-02-14 13:32:19 +0100
commit3b12e68a5c4609deb9fc69607e0aec072700c0a9 (patch)
tree3f2157d080d4689f6e3dc3917484971c8fc90f29 /src/backend/utils/adt/array_userfuncs.c
parenta8a44828a2e15c95a15549063205b779f7055f1c (diff)
downloadpostgresql-3b12e68a5c4609deb9fc69607e0aec072700c0a9.tar.gz
postgresql-3b12e68a5c4609deb9fc69607e0aec072700c0a9.zip
Change argument type of pq_sendbytes from char * to void *
This is a follow-up to 1f605b82ba66ece8b421b10d41094dd2e3c0c48b. It allows getting rid of further casts at call sites. Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Discussion: https://www.postgresql.org/message-id/783a4edb-84f9-6df2-7470-2ef5ccc6607a@enterprisedb.com
Diffstat (limited to 'src/backend/utils/adt/array_userfuncs.c')
-rw-r--r--src/backend/utils/adt/array_userfuncs.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c
index c8a8d33ca35..80750191d8d 100644
--- a/src/backend/utils/adt/array_userfuncs.c
+++ b/src/backend/utils/adt/array_userfuncs.c
@@ -654,7 +654,7 @@ array_agg_serialize(PG_FUNCTION_ARGS)
pq_sendbyte(&buf, state->typalign);
/* dnulls */
- pq_sendbytes(&buf, (char *) state->dnulls, sizeof(bool) * state->nelems);
+ pq_sendbytes(&buf, state->dnulls, sizeof(bool) * state->nelems);
/*
* dvalues. By agreement with array_agg_deserialize, when the element
@@ -664,8 +664,7 @@ array_agg_serialize(PG_FUNCTION_ARGS)
* must be sent first).
*/
if (state->typbyval)
- pq_sendbytes(&buf, (char *) state->dvalues,
- sizeof(Datum) * state->nelems);
+ pq_sendbytes(&buf, state->dvalues, sizeof(Datum) * state->nelems);
else
{
SerialIOData *iodata;
@@ -1097,7 +1096,7 @@ array_agg_array_serialize(PG_FUNCTION_ARGS)
if (state->nullbitmap)
{
Assert(state->aitems > 0);
- pq_sendbytes(&buf, (char *) state->nullbitmap, (state->aitems + 7) / 8);
+ pq_sendbytes(&buf, state->nullbitmap, (state->aitems + 7) / 8);
}
/* nitems */
@@ -1107,10 +1106,10 @@ array_agg_array_serialize(PG_FUNCTION_ARGS)
pq_sendint32(&buf, state->ndims);
/* dims: XXX should we just send ndims elements? */
- pq_sendbytes(&buf, (char *) state->dims, sizeof(state->dims));
+ pq_sendbytes(&buf, state->dims, sizeof(state->dims));
/* lbs */
- pq_sendbytes(&buf, (char *) state->lbs, sizeof(state->lbs));
+ pq_sendbytes(&buf, state->lbs, sizeof(state->lbs));
result = pq_endtypsend(&buf);