Skip to content

Commit 81cd30e

Browse files
knizhnikKonstantin Knizhnik
and
Konstantin Knizhnik
authored
Use #ifdef instead of #if USE_ASSERT_CHECKING (#10683)
## Problem USE_ASSERT _CHECKING is defined as empty entity. but it is checked using #if ## Summary of changes Replace `#if USE_ASSERT _CHECKING` with `#ifdef USE_ASSERT _CHECKING` as done in other places in Postgres Co-authored-by: Konstantin Knizhnik <[email protected]>
1 parent 7fc6953 commit 81cd30e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pgxn/neon/file_cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,8 @@ lfc_cache_containsv(NRelFileInfo rinfo, ForkNumber forkNum, BlockNumber blkno,
563563

564564
LWLockRelease(lfc_lock);
565565

566-
#if USE_ASSERT_CHECKING
567-
do {
566+
#ifdef USE_ASSERT_CHECKING
567+
{
568568
int count = 0;
569569

570570
for (int j = 0; j < nblocks; j++)
@@ -574,7 +574,7 @@ lfc_cache_containsv(NRelFileInfo rinfo, ForkNumber forkNum, BlockNumber blkno,
574574
}
575575

576576
Assert(count == found);
577-
} while (false);
577+
}
578578
#endif
579579

580580
return found;

pgxn/neon/pagestore_smgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ prefetch_register_bufferv(BufferTag tag, neon_request_lsns *frlsns,
916916
{
917917
uint64 min_ring_index;
918918
PrefetchRequest hashkey;
919-
#if USE_ASSERT_CHECKING
919+
#ifdef USE_ASSERT_CHECKING
920920
bool any_hits = false;
921921
#endif
922922
/* We will never read further ahead than our buffer can store. */
@@ -955,7 +955,7 @@ prefetch_register_bufferv(BufferTag tag, neon_request_lsns *frlsns,
955955
else
956956
lsns = NULL;
957957

958-
#if USE_ASSERT_CHECKING
958+
#ifdef USE_ASSERT_CHECKING
959959
any_hits = true;
960960
#endif
961961

0 commit comments

Comments
 (0)