Run through toupper() conversion in the forward direction.
authorThomas G. Lockhart
Thu, 4 Dec 1997 23:28:20 +0000 (23:28 +0000)
committerThomas G. Lockhart
Thu, 4 Dec 1997 23:28:20 +0000 (23:28 +0000)
 Most processors should optimize this a bit better wrt cache prefetch.

src/interfaces/libpq/fe-exec.c

index 72752ad36bd87a90ba848566f142c7e473bac9f6..d9609ee3285820a414ed28b5cefe8ece46784d3e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * 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';
    }
    else
-       for (i = strlen(field_case); i >= 0; i--)
+       for (i = 0; i < strlen(field_case); i++)
            if (isupper(field_case[i]))
                field_case[i] = tolower(field_case[i]);