1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Remove AssertArg and AssertState

These don't offer anything over plain Assert, and their usage had
already been declared obsolescent.

Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13
This commit is contained in:
Peter Eisentraut
2022-10-28 09:19:06 +02:00
parent d37aa3d358
commit b1099eca8f
44 changed files with 162 additions and 174 deletions

View File

@@ -816,7 +816,7 @@ LWLockAttemptLock(LWLock *lock, LWLockMode mode)
{
uint32 old_state;
AssertArg(mode == LW_EXCLUSIVE || mode == LW_SHARED);
Assert(mode == LW_EXCLUSIVE || mode == LW_SHARED);
/*
* Read once outside the loop, later iterations will get the newer value
@@ -1204,7 +1204,7 @@ LWLockAcquire(LWLock *lock, LWLockMode mode)
lwstats = get_lwlock_stats_entry(lock);
#endif
AssertArg(mode == LW_SHARED || mode == LW_EXCLUSIVE);
Assert(mode == LW_SHARED || mode == LW_EXCLUSIVE);
PRINT_LWDEBUG("LWLockAcquire", lock, mode);
@@ -1368,7 +1368,7 @@ LWLockConditionalAcquire(LWLock *lock, LWLockMode mode)
{
bool mustwait;
AssertArg(mode == LW_SHARED || mode == LW_EXCLUSIVE);
Assert(mode == LW_SHARED || mode == LW_EXCLUSIVE);
PRINT_LWDEBUG("LWLockConditionalAcquire", lock, mode);