Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit598bb8c

Browse files
committed
psql: Remove inappropriate const qualifiers
Since mbvalidate() can alter the string it validates, having thecallers claim that the strings they accept are const is inappropriate.
1 parent359dea2 commit598bb8c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎src/bin/psql/mbprint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ unsigned char *
385385
mbvalidate(unsignedchar*pwcs,intencoding)
386386
{
387387
if (encoding==PG_UTF8)
388-
mb_utf_validate((unsignedchar*)pwcs);
388+
mb_utf_validate(pwcs);
389389
else
390390
{
391391
/*

‎src/bin/psql/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,7 @@ printTableInit(printTableContent *const content, const printTableOpt *opt,
21222122
* column.
21232123
*/
21242124
void
2125-
printTableAddHeader(printTableContent*constcontent,constchar*header,
2125+
printTableAddHeader(printTableContent*constcontent,char*header,
21262126
constbooltranslate,constcharalign)
21272127
{
21282128
#ifndefENABLE_NLS
@@ -2162,7 +2162,7 @@ printTableAddHeader(printTableContent *const content, const char *header,
21622162
* Note: Automatic freeing of translatable strings is not supported.
21632163
*/
21642164
void
2165-
printTableAddCell(printTableContent*constcontent,constchar*cell,
2165+
printTableAddCell(printTableContent*constcontent,char*cell,
21662166
constbooltranslate,constboolmustfree)
21672167
{
21682168
#ifndefENABLE_NLS

‎src/bin/psql/print.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ extern void printTableInit(printTableContent *const content,
162162
constprintTableOpt*opt,constchar*title,
163163
constintncolumns,constintnrows);
164164
externvoidprintTableAddHeader(printTableContent*constcontent,
165-
constchar*header,constbooltranslate,constcharalign);
165+
char*header,constbooltranslate,constcharalign);
166166
externvoidprintTableAddCell(printTableContent*constcontent,
167-
constchar*cell,constbooltranslate,constboolmustfree);
167+
char*cell,constbooltranslate,constboolmustfree);
168168
externvoidprintTableAddFooter(printTableContent*constcontent,
169169
constchar*footer);
170170
externvoidprintTableSetFooter(printTableContent*constcontent,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp