Commit 274dfdb5 authored by Tom Lane's avatar Tom Lane

Tweak clean_encoding_name() API to avoid need to cast away const.

Kris Jurka
parent 6ee2a3be
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Encoding names and routines for work with it. All * Encoding names and routines for work with it. All
* in this file is shared bedween FE and BE. * in this file is shared bedween FE and BE.
* *
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.33 2007/04/15 10:56:25 ishii Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.34 2007/04/16 18:50:49 tgl Exp $
*/ */
#ifdef FRONTEND #ifdef FRONTEND
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -460,10 +460,10 @@ pg_valid_server_encoding(const char *name) ...@@ -460,10 +460,10 @@ pg_valid_server_encoding(const char *name)
* ---------- * ----------
*/ */
static char * static char *
clean_encoding_name(char *key, char *newkey) clean_encoding_name(const char *key, char *newkey)
{ {
char *p, const char *p;
*np; char *np;
for (p = key, np = newkey; *p != '\0'; p++) for (p = key, np = newkey; *p != '\0'; p++)
{ {
...@@ -508,7 +508,7 @@ pg_char_to_encname_struct(const char *name) ...@@ -508,7 +508,7 @@ pg_char_to_encname_struct(const char *name)
errmsg("encoding name too long"))); errmsg("encoding name too long")));
#endif #endif
} }
key = clean_encoding_name((char *) name, buff); key = clean_encoding_name(name, buff);
while (last >= base) while (last >= base)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment