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

Commit22bd99e

Browse files
committed
From: hankin <hankin@consultco.com>
a while back I posted a patch for pg_ident, the patch worked but I didn'tdiagnose the problem properly.on my compiler(gcc2.7.2) this compiles with no errors...char buf[1000]; if(buf != '\0') {...but it doesn't compare '\0' with the first char of buf.
1 parentbb7f173 commit22bd99e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/backend/libpq/hba.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.29 1998/02/26 04:31:49 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.30 1998/03/15 08:18:03 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -662,20 +662,24 @@ parse_map_record(FILE *file,
662662
file_iuser[0]='\0';
663663

664664
next_token(file,buf,sizeof(buf));
665-
if (buf!='\0')
665+
if (buf[0]!='\0')
666666
{
667667
strcpy(file_map,buf);
668668
next_token(file,buf,sizeof(buf));
669-
if (buf!='\0')
669+
if (buf[0]!='\0')
670670
{
671671
strcpy(file_iuser,buf);
672672
next_token(file,buf,sizeof(buf));
673-
if (buf!='\0')
673+
if (buf[0]!='\0')
674674
{
675675
strcpy(file_pguser,buf);
676676
read_through_eol(file);
677+
return;
677678
}
678679
}
680+
sprintf(PQerrormsg,"Incomplete line in pg_ident: %s",file_map);
681+
fputs(PQerrormsg,stderr);
682+
pqdebug("%s",PQerrormsg);
679683
}
680684
}
681685

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp