mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user