pgsql: Fix misplaced const

Started by Peter Eisentrautabout 7 years ago2 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c8c885b7a5c8c1175288de1d8aaec3b4ae9050e1

Modified Files
--------------
src/backend/partitioning/partbounds.c | 4 ++--
src/backend/utils/adt/tsquery_op.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: pgsql: Fix misplaced const

Peter Eisentraut <peter@eisentraut.org> writes:

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.

Hmm, maybe even better to make it like this?

const char *sa = *((const char *const *) a);

regards, tom lane