Commit 4db7f15b authored by Marc G. Fournier's avatar Marc G. Fournier

Updates to libpq to fix breakage in previous patch...

Submitted by: darcy@druid.druid.com (D'Arcy J.M. Cain)
parent ae472529
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.5 1996/08/06 16:16:45 scrappy Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.6 1996/08/10 00:22:44 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -35,7 +35,8 @@ strdup(const char *string) ...@@ -35,7 +35,8 @@ strdup(const char *string)
{ {
char *nstr; char *nstr;
nstr = strcpy((char *)malloc(strlen(string)+1), string); if ((nstr = malloc(strlen(string)+1)) != NULL)
strcpy(nstr, string);
return nstr; return nstr;
} }
#endif #endif
...@@ -133,7 +134,7 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha ...@@ -133,7 +134,7 @@ PQsetdb(const char *pghost, const char* pgport, const char* pgoptions, const cha
conn->dbName = strdup(tmp); conn->dbName = strdup(tmp);
} else { } else {
char errorMessage[ERROR_MSG_LENGTH]; char errorMessage[ERROR_MSG_LENGTH];
if (tmp = fe_getauthname(errorMessage)) { if ((tmp = fe_getauthname(errorMessage)) != 0) {
conn->dbName = strdup(tmp); conn->dbName = strdup(tmp);
free(tmp); free(tmp);
} else { } else {
......
This diff is collapsed.
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