diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-06-15 18:40:05 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-06-15 18:40:05 +0000 |
commit | 27db9ecd0b15abca733a99dab3bf9771ad70507d (patch) | |
tree | 047acdb5eca8e9b5c904c7285f9fdc81b4e527c2 /src/backend/access/index/indexam.c | |
parent | 3af536a15b64b9cfd8464af2032ccf5e66e79439 (diff) |
Fix macros that were not properly surrounded by parens or braces.
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r-- | src/backend/access/index/indexam.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index 17fb43b4362..e6af2ff9e6a 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -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 \ +) /* ---------------------------------------------------------------- |