aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2009-05-27 14:16:51 +0000
committerMichael Meskes <meskes@postgresql.org>2009-05-27 14:16:51 +0000
commite7f4923d3b414f9920f0d479991f6dc3a9c1b739 (patch)
tree110e1a8efc20c7d646586b80405825d54382cc78 /src
parentfa89e18f09e8f7fc7c89e86a7c9e6969969dfc60 (diff)
downloadpostgresql-e7f4923d3b414f9920f0d479991f6dc3a9c1b739.tar.gz
postgresql-e7f4923d3b414f9920f0d479991f6dc3a9c1b739.zip
Reverting patch just in case a compiler treats this enum as signed.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/libpq/fe-exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index a73630191b1..25590f4d375 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -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];
}