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

Commit92d77c6

Browse files
committed
Fix line count error reporting in config files, like pg_hba.conf, per
report from Oliver Elphick.Backpatch to 7.3.
1 parentd9d59ca commit92d77c6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎src/backend/libpq/hba.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.90 2002/12/06 04:37:02 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.91 2002/12/11 22:17:11 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -93,6 +93,7 @@ void
9393
next_token(FILE*fp,char*buf,constintbufsz)
9494
{
9595
intc;
96+
char*start_buf=buf;
9697
char*end_buf=buf+ (bufsz-1);
9798
boolin_quote= false;
9899
boolwas_quote= false;
@@ -115,7 +116,10 @@ next_token(FILE *fp, char *buf, const int bufsz)
115116
{
116117
while ((c=getc(fp))!=EOF&&c!='\n')
117118
;
118-
continue;
119+
/* If only comment, consume EOL too; return EOL */
120+
if (c!=EOF&&buf==start_buf)
121+
c=getc(fp);
122+
break;
119123
}
120124

121125
if (buf >=end_buf)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp