From b1099eca8f38ff5cfaf0901bb91cb6a22f909bc6 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 28 Oct 2022 09:19:06 +0200 Subject: Remove AssertArg and AssertState These don't offer anything over plain Assert, and their usage had already been declared obsolescent. Author: Nathan Bossart Reviewed-by: Michael Paquier Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13 --- src/backend/utils/mmgr/generation.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/backend/utils/mmgr/generation.c') diff --git a/src/backend/utils/mmgr/generation.c b/src/backend/utils/mmgr/generation.c index 4cb75f493ff..b432a92be31 100644 --- a/src/backend/utils/mmgr/generation.c +++ b/src/backend/utils/mmgr/generation.c @@ -284,7 +284,7 @@ GenerationReset(MemoryContext context) GenerationContext *set = (GenerationContext *) context; dlist_mutable_iter miter; - AssertArg(GenerationIsValid(set)); + Assert(GenerationIsValid(set)); #ifdef MEMORY_CONTEXT_CHECKING /* Check for corruption and leaks before freeing */ @@ -354,7 +354,7 @@ GenerationAlloc(MemoryContext context, Size size) Size chunk_size; Size required_size; - AssertArg(GenerationIsValid(set)); + Assert(GenerationIsValid(set)); #ifdef MEMORY_CONTEXT_CHECKING /* ensure there's always space for the sentinel byte */ @@ -657,7 +657,7 @@ GenerationFree(void *pointer) * block is good. Future field experience may show that this Assert * had better become a regular runtime test-and-elog check. */ - AssertArg(GenerationBlockIsValid(block)); + Assert(GenerationBlockIsValid(block)); #if defined(MEMORY_CONTEXT_CHECKING) || defined(CLOBBER_FREED_MEMORY) chunksize = MemoryChunkGetValue(chunk); @@ -769,7 +769,7 @@ GenerationRealloc(void *pointer, Size size) * block is good. Future field experience may show that this Assert * had better become a regular runtime test-and-elog check. */ - AssertArg(GenerationBlockIsValid(block)); + Assert(GenerationBlockIsValid(block)); oldsize = MemoryChunkGetValue(chunk); } @@ -888,7 +888,7 @@ GenerationGetChunkContext(void *pointer) else block = (GenerationBlock *) MemoryChunkGetBlock(chunk); - AssertArg(GenerationBlockIsValid(block)); + Assert(GenerationBlockIsValid(block)); return &block->context->header; } @@ -907,7 +907,7 @@ GenerationGetChunkSpace(void *pointer) { GenerationBlock *block = ExternalChunkGetBlock(chunk); - AssertArg(GenerationBlockIsValid(block)); + Assert(GenerationBlockIsValid(block)); chunksize = block->endptr - (char *) pointer; } else @@ -926,7 +926,7 @@ GenerationIsEmpty(MemoryContext context) GenerationContext *set = (GenerationContext *) context; dlist_iter iter; - AssertArg(GenerationIsValid(set)); + Assert(GenerationIsValid(set)); dlist_foreach(iter, &set->blocks) { @@ -964,7 +964,7 @@ GenerationStats(MemoryContext context, Size freespace = 0; dlist_iter iter; - AssertArg(GenerationIsValid(set)); + Assert(GenerationIsValid(set)); /* Include context header in totalspace */ totalspace = MAXALIGN(sizeof(GenerationContext)); -- cgit v1.2.3