Skip to content

Commit 571340a

Browse files
committed
Parenthesize macro arguments safely. I see no bug among the current
uses of PG_DETOAST_DATUM_SLICE, but it's clearly trouble waiting to happen.
1 parent 5e87ebb commit 571340a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/fmgr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.53 2007/09/21 22:52:52 tgl Exp $
14+
* $PostgreSQL: pgsql/src/include/fmgr.h,v 1.54 2007/09/22 04:41:19 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -179,7 +179,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum);
179179
pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum))
180180
#define PG_DETOAST_DATUM_SLICE(datum,f,c) \
181181
pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \
182-
(int32) f, (int32) c)
182+
(int32) (f), (int32) (c))
183183
/* WARNING -- unaligned pointer */
184184
#define PG_DETOAST_DATUM_PACKED(datum) \
185185
pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy