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

Commit 9e196d7

Browse files
committed
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.
1 parent 7234777 commit 9e196d7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/interfaces/libpq/fe-auth.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.115 2006/06/20 19:56:52 tgl Exp $
13+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.116 2006/07/12 02:31:56 joe Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -188,10 +188,10 @@ pg_krb5_destroy(struct krb5_info *info)
188188

189189

190190
/*
191-
* pg_krb5_authname -- returns a pointer to static space containing whatever
192-
* name the user has authenticated to the system
193-
*/
194-
static const char *
191+
* pg_krb5_authname -- returns a copy of whatever name the user
192+
* has authenticated to the system, or NULL
193+
*/
194+
static char *
195195
pg_krb5_authname(char *PQerrormsg)
196196
{
197197
char *tmp_name;
@@ -520,7 +520,7 @@ char *
520520
pg_fe_getauthname(char *PQerrormsg)
521521
{
522522
#ifdef KRB5
523-
const char *krb5_name = NULL;
523+
char *krb5_name = NULL;
524524
#endif
525525
const char *name = NULL;
526526
char *authn;

0 commit comments

Comments
 (0)