mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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/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