From: Michael Meskes Date: 2009年5月27日 14:16:51 +0000 (+0000) Subject: Reverting patch just in case a compiler treats this enum as signed. X-Git-Tag: REL8_4_RC1~77 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=e7f4923d3b414f9920f0d479991f6dc3a9c1b739;p=postgresql.git Reverting patch just in case a compiler treats this enum as signed. --- 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]; }

AltStyle によって変換されたページ (->オリジナル) /