get_user_name returns const char *, but we were assigning the result
to a char * variable.
/* util.c */
char *quote_identifier(const char *s);
-int get_user_info(char **user_name);
+int get_user_info(char **user_name_p);
void check_ok(void);
void
report_status(eLogType type, const char *fmt,...)
* get_user_info()
*/
int
-get_user_info(char **user_name)
+get_user_info(char **user_name_p)
{
int user_id;
+ const char *user_name;
char *errstr;
#ifndef WIN32
user_id = 1;
#endif
- *user_name = get_user_name(&errstr);
- if (!*user_name)
+ user_name = get_user_name(&errstr);
+ if (!user_name)
pg_fatal("%s\n", errstr);
/* make a copy */
- *user_name = pg_strdup(*user_name);
+ *user_name_p = pg_strdup(user_name);
return user_id;
}