From e7f4923d3b414f9920f0d479991f6dc3a9c1b739 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Wed, 27 May 2009 14:16:51 +0000 Subject: [PATCH] Reverting patch just in case a compiler treats this enum as signed. --- src/interfaces/libpq/fe-exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index a73630191b..25590f4d37 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]; } -- 2.40.0