diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
index 100f2fc7a57170062c5b2cdc03b800eeff86bbf9..5fabdcb92dfa2e59e05ea3f79a5f4628f78f2bad 100644
--- a/src/backend/commands/define.c
+++ b/src/backend/commands/define.c
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.18 1997/11/26 04:50:28 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.19 1997/12/05 01:12:40 momjian Exp $
  *
  * DESCRIPTION
  *	  The "DefineFoo" routines take the parse tree and pick out the
@@ -69,7 +69,7 @@ case_translate_language_name(const char *input, char *output)
 --------------------------------------------------------------------------*/
 	int			i;
 
-	for (i = 0; i < NAMEDATALEN && input[i] != '\0'; ++i)
+	for (i = 0; i < NAMEDATALEN && input[i]; ++i)
 		output[i] = tolower(input[i]);
 
 	output[i] = '\0';
diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c
index 8cc8b5ae48c6ba27bb9a0ea498ede22c505123d8..caa1c8b832fc3073651cfbf5a562c35cf0bf9361 100644
--- a/src/backend/commands/proclang.c
+++ b/src/backend/commands/proclang.c
@@ -28,7 +28,7 @@ case_translate_language_name(const char *input, char *output)
 --------------------------------------------------------------------------*/
 	int			i;
 
-	for (i = 0; i < NAMEDATALEN && input[i] != '\0'; ++i)
+	for (i = 0; i < NAMEDATALEN && input[i]; ++i)
 		output[i] = tolower(input[i]);
 
 	output[i] = '\0';
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 1c5db68ad63d0e54d5acb5ddbf1fcee8c5b589d2..9e300ba111fd018dc1a58ae1e9c0b7f68cbf58b9 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.31 1997/11/30 23:05:36 thomas Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.32 1997/12/05 01:12:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -355,7 +355,7 @@ other			.
 					int i;
 					ScanKeyword		*keyword;
 
-					for(i = strlen(yytext); i >= 0; i--)
+					for(i = 0; yytext[i]; i++)
 						if (isupper(yytext[i]))
 							yytext[i] = tolower(yytext[i]);
 
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index ed2b46e2682ccd9599ef535b644911d95bcdf369..2232cf72e9b5d5cb30e45201b08c1488441d7403 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.118 1997/11/30 17:46:01 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.119 1997/12/05 01:13:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -558,7 +558,7 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
 	}
 	else
 	{
-		for (i = strlen(table); i >= 0; i--)
+		for (i = 0; table[i]; i++)
 			if (isupper(table[i]))
 				table[i] = tolower(table[i]);
 	}
@@ -708,7 +708,7 @@ objectDescription(PsqlSettings *pset, char *object, FILE *fout)
 	}
 	else
 	{
-		for (i = strlen(object); i >= 0; i--)
+		for (i = 0; object[i]; i++)
 			if (isupper(object[i]))
 				object[i] = tolower(object[i]);
 	}
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index ad0b44f651d30a3e94f797f75d955a3d2000df55..2dfaf95abed9ce933ea0b41b5feaed5c40554b1b 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.52 1997/12/04 20:32:35 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.53 1997/12/05 01:13:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -444,7 +444,7 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, cons
 				*(conn->dbName + strlen(conn->dbName) - 1) = '\0';
 			}
 			else
-				for (i = strlen(conn->dbName); i >= 0; i--)
+				for (i = 0; conn->dbName[i]; i++)
 					if (isupper(conn->dbName[i]))
 						conn->dbName[i] = tolower(conn->dbName[i]);
 		}
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index d9609ee3285820a414ed28b5cefe8ece46784d3e..69c93b7bd024d6badc7d8919e1ba40fe304f4fa8 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.43 1997/12/04 23:28:20 thomas Exp $
+ *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.44 1997/12/05 01:13:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1697,7 +1697,7 @@ PQfnumber(PGresult *res, const char *field_name)
 		*(field_case + strlen(field_case) - 1) = '\0';
 	}
 	else
-		for (i = 0; i < strlen(field_case); i++)
+		for (i = 0; field_case[i]; i++)
 			if (isupper(field_case[i]))
 				field_case[i] = tolower(field_case[i]);