diff options
author | Tom Lane | 2007-09-22 04:41:19 +0000 |
---|---|---|
committer | Tom Lane | 2007-09-22 04:41:19 +0000 |
commit | 9d7b9519b9fc718973cccb24c439affc92df7736 (patch) | |
tree | ad666a2217c5ca09f95e28acc05c275aaf491163 | |
parent | ff9571b9377bccbea7549cf9a9b43f794e4527b8 (diff) |
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.
-rw-r--r-- | src/include/fmgr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h index a231626478..a57439ee25 100644 --- a/src/include/fmgr.h +++ b/src/include/fmgr.h @@ -179,7 +179,7 @@ extern struct varlena *pg_detoast_datum_packed(struct varlena * datum); pg_detoast_datum_copy((struct varlena *) DatumGetPointer(datum)) #define PG_DETOAST_DATUM_SLICE(datum,f,c) \ pg_detoast_datum_slice((struct varlena *) DatumGetPointer(datum), \ - (int32) f, (int32) c) + (int32) (f), (int32) (c)) /* WARNING -- unaligned pointer */ #define PG_DETOAST_DATUM_PACKED(datum) \ pg_detoast_datum_packed((struct varlena *) DatumGetPointer(datum)) |