Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc1e4869

Browse files
committed
Remove unneeded variable test, per Tom.
1 parenta87ee00 commitc1e4869

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.308 2005/06/1003:02:30 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.309 2005/06/1004:01:36 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3237,22 +3237,15 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username)
32373237
port=DEF_PGPORT_STR;
32383238

32393239
if ((passfile_env=getenv("PGPASSFILE"))!=NULL)
3240-
{
32413240
/* use the literal path from the environment, if set */
32423241
StrNCpy(pgpassfile,passfile_env,MAXPGPATH);
3243-
if (!pgpassfile)
3244-
{
3245-
fprintf(stderr,libpq_gettext("out of memory\n"));
3246-
returnNULL;
3247-
}
3248-
}
32493242
else
32503243
{
32513244
charhomedir[MAXPGPATH];
32523245

32533246
if (!pqGetHomeDirectory(homedir,sizeof(homedir)))
32543247
returnNULL;
3255-
snprintf(pgpassfile,sizeof(pgpassfile),"%s/%s",homedir,PGPASSFILE);
3248+
snprintf(pgpassfile,MAXPGPATH,"%s/%s",homedir,PGPASSFILE);
32563249
}
32573250

32583251
/* If password file cannot be opened, ignore it. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp