Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e7f4923

Browse files
author
Michael Meskes
committed
Reverting patch just in case a compiler treats this enum as signed.
1 parent fa89e18 commit e7f4923

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.201 2009/05/21 12:54:27 meskes Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-exec.c,v 1.202 2009/05/27 14:16:51 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -2385,7 +2385,7 @@ PQresultStatus(const PGresult *res)
23852385
char *
23862386
PQresStatus(ExecStatusType status)
23872387
{
2388-
if (status >= sizeof pgresStatus / sizeof pgresStatus[0])
2388+
if (status < 0 || status >= sizeof pgresStatus / sizeof pgresStatus[0])
23892389
return libpq_gettext("invalid ExecStatusType code");
23902390
return pgresStatus[status];
23912391
}

0 commit comments

Comments
 (0)