Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 274dfdb

Browse files
committed
Tweak clean_encoding_name() API to avoid need to cast away const.
Kris Jurka
1 parent 6ee2a3b commit 274dfdb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/utils/mb/encnames.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Encoding names and routines for work with it. All
33
* in this file is shared bedween FE and BE.
44
*
5-
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.33 2007/04/15 10:56:25 ishii Exp $
5+
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.34 2007/04/16 18:50:49 tgl Exp $
66
*/
77
#ifdef FRONTEND
88
#include "postgres_fe.h"
@@ -460,10 +460,10 @@ pg_valid_server_encoding(const char *name)
460460
* ----------
461461
*/
462462
static char *
463-
clean_encoding_name(char *key, char *newkey)
463+
clean_encoding_name(const char *key, char *newkey)
464464
{
465-
char *p,
466-
*np;
465+
const char *p;
466+
char *np;
467467

468468
for (p = key, np = newkey; *p != '\0'; p++)
469469
{
@@ -508,7 +508,7 @@ pg_char_to_encname_struct(const char *name)
508508
errmsg("encoding name too long")));
509509
#endif
510510
}
511-
key = clean_encoding_name((char *) name, buff);
511+
key = clean_encoding_name(name, buff);
512512

513513
while (last >= base)
514514
{

0 commit comments

Comments
 (0)