mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Fix macros that were not properly surrounded by parens or braces.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.11 1998/01/15 19:41:46 pgsql Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/scankey.c,v 1.12 1998/06/15 18:39:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -22,8 +22,10 @@
|
||||
* True iff the scan key entry is legal.
|
||||
*/
|
||||
#define ScanKeyEntryIsLegal(entry) \
|
||||
((bool) (AssertMacro(PointerIsValid(entry)) && \
|
||||
AttributeNumberIsValid(entry->sk_attno)))
|
||||
( \
|
||||
AssertMacro(PointerIsValid(entry)), \
|
||||
AttributeNumberIsValid((entry)->sk_attno) \
|
||||
)
|
||||
|
||||
/*
|
||||
* ScanKeyEntrySetIllegal --
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.21 1998/02/26 12:07:10 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.22 1998/06/15 18:39:23 momjian Exp $
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
* index_open - open an index relation by relationId
|
||||
@@ -92,25 +92,35 @@
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
#define RELATION_CHECKS \
|
||||
Assert(RelationIsValid(relation)); \
|
||||
Assert(PointerIsValid(relation->rd_am))
|
||||
( \
|
||||
AssertMacro(RelationIsValid(relation)), \
|
||||
AssertMacro(PointerIsValid(relation->rd_am)) \
|
||||
)
|
||||
|
||||
#define SCAN_CHECKS \
|
||||
Assert(IndexScanIsValid(scan)); \
|
||||
Assert(RelationIsValid(scan->relation)); \
|
||||
Assert(PointerIsValid(scan->relation->rd_am))
|
||||
( \
|
||||
AssertMacro(IndexScanIsValid(scan)), \
|
||||
AssertMacro(RelationIsValid(scan->relation)), \
|
||||
AssertMacro(PointerIsValid(scan->relation->rd_am)) \
|
||||
)
|
||||
|
||||
#define GET_REL_PROCEDURE(x,y) \
|
||||
procedure = relation->rd_am->y; \
|
||||
if (! RegProcedureIsValid(procedure)) \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y))
|
||||
|
||||
( \
|
||||
procedure = relation->rd_am->y, \
|
||||
(!RegProcedureIsValid(procedure)) ? \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y)) \
|
||||
: (void)NULL \
|
||||
)
|
||||
|
||||
#define GET_SCAN_PROCEDURE(x,y) \
|
||||
procedure = scan->relation->rd_am->y; \
|
||||
if (! RegProcedureIsValid(procedure)) \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y))
|
||||
( \
|
||||
procedure = scan->relation->rd_am->y, \
|
||||
(!RegProcedureIsValid(procedure)) ? \
|
||||
elog(ERROR, "index_%s: invalid %s regproc", \
|
||||
CppAsString(x), CppAsString(y)) \
|
||||
: (void)NULL \
|
||||
)
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user