Run through toupper() conversion in the forward direction.

Most processors should optimize this a bit better wrt cache prefetch.
This commit is contained in:
Thomas G. Lockhart 1997-12-04 23:28:20 +00:00
parent 6ad698c928
commit d7e0e61d84
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.42 1997/12/01 22:02:49 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.43 1997/12/04 23:28:20 thomas Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1697,7 +1697,7 @@ PQfnumber(PGresult *res, const char *field_name)
*(field_case + strlen(field_case) - 1) = '\0'; *(field_case + strlen(field_case) - 1) = '\0';
} }
else else
for (i = strlen(field_case); i >= 0; i--) for (i = 0; i < strlen(field_case); i++)
if (isupper(field_case[i])) if (isupper(field_case[i]))
field_case[i] = tolower(field_case[i]); field_case[i] = tolower(field_case[i]);