Skip to content

Commit c8c885b

Browse files
committed
Fix misplaced const
These instances were apparently trying to carry the const qualifier from the arguments through the complex casts, but for that the const qualifier was misplaced.
1 parent 2ac1b2b commit c8c885b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/backend/partitioning/partbounds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,8 +1684,8 @@ qsort_partition_hbound_cmp(const void *a, const void *b)
16841684
static int32
16851685
qsort_partition_list_value_cmp(const void *a, const void *b, void *arg)
16861686
{
1687-
Datum val1 = (*(const PartitionListValue **) a)->value,
1688-
val2 = (*(const PartitionListValue **) b)->value;
1687+
Datum val1 = (*(PartitionListValue *const *) a)->value,
1688+
val2 = (*(PartitionListValue *const *) b)->value;
16891689
PartitionKey key = (PartitionKey) arg;
16901690

16911691
return DatumGetInt32(FunctionCall2Coll(&key->partsupfunc[0],

src/backend/utils/adt/tsquery_op.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ collectTSQueryValues(TSQuery a, int *nvalues_p)
296296
static int
297297
cmp_string(const void *a, const void *b)
298298
{
299-
const char *sa = *((const char **) a);
300-
const char *sb = *((const char **) b);
299+
const char *sa = *((char *const *) a);
300+
const char *sb = *((char *const *) b);
301301

302302
return strcmp(sa, sb);
303303
}

0 commit comments

Comments
 (0)