mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Rearrange some static assertions for consistency
Put lengthof first. Reported-by: Peter Smith <smithpb2250@gmail.com> Discussion: https://www.postgresql.org/message-id/CAHut+PsUDMySVRuRc=h+P5N3+=TGvj4W_mi32XXg9dt4o-BXbA@mail.gmail.com
This commit is contained in:
parent
6fcda9aba8
commit
b18c2decd7
@ -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))
|
||||
|
2
src/backend/utils/cache/syscache.c
vendored
2
src/backend/utils/cache/syscache.c
vendored
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user