From: Peter Eisentraut Date: Tue, 6 Sep 2011 20:05:02 +0000 (+0300) Subject: Correct ancient logic mistake in assertion X-Git-Tag: REL9_2_BETA1~1130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6d800981ed0cd8889660d40cb5e813dfad87344;p=postgresql Correct ancient logic mistake in assertion Found by gcc -Wlogical-op --- diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index baea46c0a8..e3dd472832 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -817,7 +817,7 @@ InsertOneValue(char *value, int i) Oid typoutput; char *prt; - AssertArg(i >= 0 || i < MAXATTR); + AssertArg(i >= 0 && i < MAXATTR); elog(DEBUG4, "inserting column %d value \"%s\"", i, value); @@ -842,7 +842,7 @@ void InsertOneNull(int i) { elog(DEBUG4, "inserting column %d NULL", i); - Assert(i >= 0 || i < MAXATTR); + Assert(i >= 0 && i < MAXATTR); values[i] = PointerGetDatum(NULL); Nulls[i] = true; }