]> granicus.if.org Git - postgresql/commitdiff
Reverting patch just in case a compiler treats this enum as signed.
authorMichael Meskes <meskes@postgresql.org>
Wed, 27 May 2009 14:16:51 +0000 (14:16 +0000)
committerMichael Meskes <meskes@postgresql.org>
Wed, 27 May 2009 14:16:51 +0000 (14:16 +0000)
src/interfaces/libpq/fe-exec.c

index a73630191b1940ee4f32a035d0820b42650e31b3..25590f4d3752b15c657edb80ffbdb59d73e826f8 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.201 2009/05/21 12:54:27 meskes Exp $
+ *       $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.202 2009/05/27 14:16:51 meskes Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
 char *
 PQresStatus(ExecStatusType status)
 {
-       if (status >= sizeof pgresStatus / sizeof pgresStatus[0])
+       if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
                return libpq_gettext("invalid ExecStatusType code");
        return pgresStatus[status];
 }