Reverting patch just in case a compiler treats this enum as signed.

This commit is contained in:
Michael Meskes 2009-05-27 14:16:51 +00:00
parent fa89e18f09
commit e7f4923d3b

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * char *
PQresStatus(ExecStatusType status) 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 libpq_gettext("invalid ExecStatusType code");
return pgresStatus[status]; return pgresStatus[status];
} }