These changes allow the module to compile quietly when assert checking is

not being done.
This commit is contained in:
Bruce Momjian 1997-08-12 23:03:50 +00:00
parent ea5b5357cd
commit 0b2eb99f01
1 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.7 1996/11/05 09:40:25 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.8 1997/08/12 23:03:50 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -126,17 +126,16 @@ _hash_log2(uint32 num)
void void
_hash_checkpage(Page page, int flags) _hash_checkpage(Page page, int flags)
{ {
PageHeader ph = (PageHeader) page;
HashPageOpaque opaque; HashPageOpaque opaque;
Assert(page); Assert(page);
Assert(ph->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData))); Assert(((PageHeader)(ph))->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData)));
#if 1 #if 1
Assert(ph->pd_upper <= Assert(((PageHeader)(ph))->pd_upper <=
(BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData)))); (BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
Assert(ph->pd_special == Assert(((PageHeader)(ph))->pd_special ==
(BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData)))); (BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
Assert(ph->pd_opaque.od_pagesize == BLCKSZ); Assert(((PageHeader)(ph))->pd_opaque.od_pagesize == BLCKSZ);
#endif #endif
if (flags) { if (flags) {
opaque = (HashPageOpaque) PageGetSpecialPointer(page); opaque = (HashPageOpaque) PageGetSpecialPointer(page);