We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentd9d59ca commit92d77c6Copy full SHA for 92d77c6
src/backend/libpq/hba.c
@@ -10,7 +10,7 @@
10
*
11
12
* IDENTIFICATION
13
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.90 2002/12/06 04:37:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.91 2002/12/11 22:17:11 momjian Exp $
14
15
*-------------------------------------------------------------------------
16
*/
@@ -93,6 +93,7 @@ void
93
next_token(FILE*fp,char*buf,constintbufsz)
94
{
95
intc;
96
+char*start_buf=buf;
97
char*end_buf=buf+ (bufsz-1);
98
boolin_quote= false;
99
boolwas_quote= false;
@@ -115,7 +116,10 @@ next_token(FILE *fp, char *buf, const int bufsz)
115
116
117
while ((c=getc(fp))!=EOF&&c!='\n')
118
;
-continue;
119
+/* If only comment, consume EOL too; return EOL */
120
+if (c!=EOF&&buf==start_buf)
121
+c=getc(fp);
122
+break;
123
}
124
125
if (buf >=end_buf)