1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Get rid of perror(), substitute some better phrased error messages.

malloc() doesn't set errno, so most uses were buggy anyway.
This commit is contained in:
Peter Eisentraut
2004-11-09 15:57:57 +00:00
parent 960f545041
commit e9c05281b5
6 changed files with 40 additions and 33 deletions

View File

@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.94 2004/10/16 03:10:17 momjian Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.95 2004/11/09 15:57:57 petere Exp $
*
*-------------------------------------------------------------------------
*/
@ -527,7 +527,7 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
if (!(crypt_pwd = malloc(MD5_PASSWD_LEN + 1)) ||
!(crypt_pwd2 = malloc(MD5_PASSWD_LEN + 1)))
{
perror("malloc");
fprintf(stderr, libpq_gettext("out of memory\n"));
return STATUS_ERROR;
}
if (!EncryptMD5(password, conn->pguser,