Commit 9e196d7c authored by Joe Conway's avatar Joe Conway

Clean up for warning:

  fe-auth.c:573: warning: passing argument 1 of 'free' discards qualifiers
  from pointer target type
pg_krb5_authname used to return a (const char *) to memory allocated by
krb. Somewhere along the lines this was changed so that a copy was
made, returned, and freed instead. However the const modifier was never
removed.
parent 72347776
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes). * exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.115 2006/06/20 19:56:52 tgl Exp $ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.116 2006/07/12 02:31:56 joe Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -188,10 +188,10 @@ pg_krb5_destroy(struct krb5_info *info) ...@@ -188,10 +188,10 @@ pg_krb5_destroy(struct krb5_info *info)
/* /*
* pg_krb5_authname -- returns a pointer to static space containing whatever * pg_krb5_authname -- returns a copy of whatever name the user
* name the user has authenticated to the system * has authenticated to the system, or NULL
*/ */
static const char * static char *
pg_krb5_authname(char *PQerrormsg) pg_krb5_authname(char *PQerrormsg)
{ {
char *tmp_name; char *tmp_name;
...@@ -520,7 +520,7 @@ char * ...@@ -520,7 +520,7 @@ char *
pg_fe_getauthname(char *PQerrormsg) pg_fe_getauthname(char *PQerrormsg)
{ {
#ifdef KRB5 #ifdef KRB5
const char *krb5_name = NULL; char *krb5_name = NULL;
#endif #endif
const char *name = NULL; const char *name = NULL;
char *authn; char *authn;
......
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