diff --git a/src/backend/executor/execExprInterp.c b/src/backend/executor/execExprInterp.c index 1dab2787b7..be48886511 100644 --- a/src/backend/executor/execExprInterp.c +++ b/src/backend/executor/execExprInterp.c @@ -496,7 +496,7 @@ ExecInterpExpr(ExprState *state, ExprContext *econtext, bool *isnull) &&CASE_EEOP_LAST }; - StaticAssertStmt(EEOP_LAST + 1 == lengthof(dispatch_table), + StaticAssertStmt(lengthof(dispatch_table) == EEOP_LAST + 1, "dispatch_table out of whack with ExprEvalOp"); if (unlikely(state == NULL)) diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index eec644ec84..8b35968353 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -1068,7 +1068,7 @@ InitCatalogCache(void) { int cacheId; - StaticAssertStmt(SysCacheSize == (int) lengthof(cacheinfo), + StaticAssertStmt(lengthof(cacheinfo) == SysCacheSize, "SysCacheSize does not match syscache.c's array"); Assert(!CacheInitialized);