summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorBruce Momjian2005-05-25 21:40:43 +0000
committerBruce Momjian2005-05-25 21:40:43 +0000
commitb492c3acccb3f8c97559ddfc2a25f25953a026d2 (patch)
treea9c42aa2bd86a88a849ffaa005766ffe3dee762a /src/include/access
parent13b729ca5267b58005f1ca9c873a86c2b0db3591 (diff)
Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/attnum.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index 37a500f77f9..7a4822e63f7 100644
--- a/src/include/access/attnum.h
+++ b/src/include/access/attnum.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/attnum.h,v 1.20 2004/12/31 22:03:21 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/access/attnum.h,v 1.21 2005/05/25 21:40:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,6 +58,6 @@ typedef int16 AttrNumber;
* Returns the attribute number for an attribute offset.
*/
#define AttrOffsetGetAttrNumber(attributeOffset) \
- ((AttrNumber) (1 + attributeOffset))
+ ((AttrNumber) (1 + (attributeOffset)))
#endif /* ATTNUM_H */