summaryrefslogtreecommitdiff
path: root/src/backend/libpq/hba.c
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-03-15 08:18:03 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-03-15 08:18:03 +0000
commit22bd99e462f24b5f98b4b879c3f019b6cb4f2ada (patch)
treea74922ce09696b963c7efa1cf0d8cd8a29c646c7 /src/backend/libpq/hba.c
parentbb7f173c0c07db2973e4b35286560ca8cc01d3a1 (diff)
From: hankin <hankin@consultco.com>
a while back I posted a patch for pg_ident, the patch worked but I didn't diagnose 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.
Diffstat (limited to 'src/backend/libpq/hba.c')
-rw-r--r--src/backend/libpq/hba.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 97045ff012c..10a2acdc27b 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.29 1998/02/26 04:31:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.30 1998/03/15 08:18:03 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -662,20 +662,24 @@ parse_map_record(FILE *file,
file_iuser[0] = '\0';
next_token(file, buf, sizeof(buf));
- if (buf != '\0')
+ if (buf[0] != '\0')
{
strcpy(file_map, buf);
next_token(file, buf, sizeof(buf));
- if (buf != '\0')
+ if (buf[0] != '\0')
{
strcpy(file_iuser, buf);
next_token(file, buf, sizeof(buf));
- if (buf != '\0')
+ if (buf[0] != '\0')
{
strcpy(file_pguser, buf);
read_through_eol(file);
+ return;
}
}
+ sprintf(PQerrormsg,"Incomplete line in pg_ident: %s",file_map);
+ fputs(PQerrormsg, stderr);
+ pqdebug("%s", PQerrormsg);
}
}