aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas G. Lockhart <lockhart@fourpalms.org>1997-06-03 14:07:24 +0000
committerThomas G. Lockhart <lockhart@fourpalms.org>1997-06-03 14:07:24 +0000
commit3887d41b1354a842ce16b7a9c4317ff7ca899ec7 (patch)
tree69900d3b09558cb539b9c4cf00b9f755c73391a8 /src
parent06ea3c9a242697205e7f4dc5955a79fee2ec2957 (diff)
downloadpostgresql-3887d41b1354a842ce16b7a9c4317ff7ca899ec7.tar.gz
postgresql-3887d41b1354a842ce16b7a9c4317ff7ca899ec7.zip
Put parens around macro arguments for safety per D'Arcy's suggestion.
Diffstat (limited to 'src')
-rw-r--r--src/include/utils/dt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h
index b2c18a994db..20979b39f69 100644
--- a/src/include/utils/dt.h
+++ b/src/include/utils/dt.h
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dt.h,v 1.9 1997/05/23 05:10:03 thomas Exp $
+ * $Id: dt.h,v 1.10 1997/06/03 14:07:24 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -173,7 +173,7 @@ typedef struct {
* Bit mask definitions for time parsing.
*/
-#define DTK_M(t) (0x01 << t)
+#define DTK_M(t) (0x01 << (t))
#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY))
#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND))
@@ -241,7 +241,7 @@ typedef struct {
#define TIMESPAN_NOT_FINITE(j) TIMESPAN_IS_INVALID(j)
#define TIME_PREC 1e-6
-#define JROUND(j) (rint(((double) j)/TIME_PREC)*TIME_PREC)
+#define JROUND(j) (rint(((double) (j))/TIME_PREC)*TIME_PREC)
/*
* dt.c prototypes