diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-10-22 19:40:26 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-10-22 19:40:26 -0400 |
commit | 2c66f9924c1162bfba27c77004ccf42fb6ea188d (patch) | |
tree | 920c20776ef6d13d7a5d3a836202d897abcaf428 /src/bin/psql/startup.c | |
parent | 09a89cb5fc29b47c26d151e82293fd3bef592b7b (diff) | |
download | postgresql-2c66f9924c1162bfba27c77004ccf42fb6ea188d.tar.gz postgresql-2c66f9924c1162bfba27c77004ccf42fb6ea188d.zip |
Replace pg_asprintf() with psprintf().
This eliminates an awkward coding pattern that's also unnecessarily
inconsistent with backend coding. psprintf() is now the thing to
use everywhere.
Diffstat (limited to 'src/bin/psql/startup.c')
-rw-r--r-- | src/bin/psql/startup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index a45ec552f42..a9836a59a81 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -182,8 +182,8 @@ main(int argc, char *argv[]) if (options.username == NULL) password_prompt = pg_strdup(_("Password: ")); else - pg_asprintf(&password_prompt, _("Password for user %s: "), - options.username); + password_prompt = psprintf(_("Password for user %s: "), + options.username); if (pset.getPassword == TRI_YES) password = simple_prompt(password_prompt, 100, false); @@ -638,8 +638,8 @@ process_psqlrc_file(char *filename) #define R_OK 4 #endif - pg_asprintf(&psqlrc_minor, "%s-%s", filename, PG_VERSION); - pg_asprintf(&psqlrc_major, "%s-%s", filename, PG_MAJORVERSION); + psqlrc_minor = psprintf("%s-%s", filename, PG_VERSION); + psqlrc_major = psprintf("%s-%s", filename, PG_MAJORVERSION); /* check for minor version first, then major, then no version */ if (access(psqlrc_minor, R_OK) == 0) |