psql: Remove inappropriate const qualifiers
Since mbvalidate() can alter the string it validates, having the callers claim that the strings they accept are const is inappropriate.
This commit is contained in:
parent
359dea2859
commit
598bb8cdbd
|
@ -385,7 +385,7 @@ unsigned char *
|
|||
mbvalidate(unsigned char *pwcs, int encoding)
|
||||
{
|
||||
if (encoding == PG_UTF8)
|
||||
mb_utf_validate((unsigned char *) pwcs);
|
||||
mb_utf_validate(pwcs);
|
||||
else
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -2122,7 +2122,7 @@ printTableInit(printTableContent *const content, const printTableOpt *opt,
|
|||
* column.
|
||||
*/
|
||||
void
|
||||
printTableAddHeader(printTableContent *const content, const char *header,
|
||||
printTableAddHeader(printTableContent *const content, char *header,
|
||||
const bool translate, const char align)
|
||||
{
|
||||
#ifndef ENABLE_NLS
|
||||
|
@ -2162,7 +2162,7 @@ printTableAddHeader(printTableContent *const content, const char *header,
|
|||
* Note: Automatic freeing of translatable strings is not supported.
|
||||
*/
|
||||
void
|
||||
printTableAddCell(printTableContent *const content, const char *cell,
|
||||
printTableAddCell(printTableContent *const content, char *cell,
|
||||
const bool translate, const bool mustfree)
|
||||
{
|
||||
#ifndef ENABLE_NLS
|
||||
|
|
|
@ -162,9 +162,9 @@ extern void printTableInit(printTableContent *const content,
|
|||
const printTableOpt *opt, const char *title,
|
||||
const int ncolumns, const int nrows);
|
||||
extern void printTableAddHeader(printTableContent *const content,
|
||||
const char *header, const bool translate, const char align);
|
||||
char *header, const bool translate, const char align);
|
||||
extern void printTableAddCell(printTableContent *const content,
|
||||
const char *cell, const bool translate, const bool mustfree);
|
||||
char *cell, const bool translate, const bool mustfree);
|
||||
extern void printTableAddFooter(printTableContent *const content,
|
||||
const char *footer);
|
||||
extern void printTableSetFooter(printTableContent *const content,
|
||||
|
|
Loading…
Reference in New Issue