Skip to content

Commit 0b2eb99

Browse files
committed
These changes allow the module to compile quietly when assert checking is
not being done.
1 parent ea5b535 commit 0b2eb99

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/backend/access/hash/hashutil.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.7 1996/11/05 09:40:25 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.8 1997/08/12 23:03:50 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -126,17 +126,16 @@ _hash_log2(uint32 num)
126126
void
127127
_hash_checkpage(Page page, int flags)
128128
{
129-
PageHeader ph = (PageHeader) page;
130129
HashPageOpaque opaque;
131130

132131
Assert(page);
133-
Assert(ph->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData)));
132+
Assert(((PageHeader)(ph))->pd_lower >= (sizeof(PageHeaderData) - sizeof(ItemIdData)));
134133
#if 1
135-
Assert(ph->pd_upper <=
134+
Assert(((PageHeader)(ph))->pd_upper <=
136135
(BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
137-
Assert(ph->pd_special ==
136+
Assert(((PageHeader)(ph))->pd_special ==
138137
(BLCKSZ - DOUBLEALIGN(sizeof(HashPageOpaqueData))));
139-
Assert(ph->pd_opaque.od_pagesize == BLCKSZ);
138+
Assert(((PageHeader)(ph))->pd_opaque.od_pagesize == BLCKSZ);
140139
#endif
141140
if (flags) {
142141
opaque = (HashPageOpaque) PageGetSpecialPointer(page);

0 commit comments

Comments
 (0)