Commit 3758affc authored by Bruce Momjian's avatar Bruce Momjian

More removal of unneeded parentheses.

parent ca256f32
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.140 2005/07/22 15:15:38 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.141 2005/07/22 19:00:54 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -1006,7 +1006,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn, ...@@ -1006,7 +1006,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
* specified. Go ahead and rotate to the local time zone since we will * specified. Go ahead and rotate to the local time zone since we will
* later bypass any calls which adjust the tm fields. * later bypass any calls which adjust the tm fields.
*/ */
if ((attimezone==NULL) && HasCTZSet && (tzp != NULL)) if (attimezone == NULL && HasCTZSet && tzp != NULL)
{ {
#ifdef HAVE_INT64_TIMESTAMP #ifdef HAVE_INT64_TIMESTAMP
dt -= CTimeZone * USECS_PER_SEC; dt -= CTimeZone * USECS_PER_SEC;
...@@ -1059,7 +1059,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn, ...@@ -1059,7 +1059,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
* We have a brute force time zone per SQL99? Then use it without * We have a brute force time zone per SQL99? Then use it without
* change since we have already rotated to the time zone. * change since we have already rotated to the time zone.
*/ */
if ((attimezone == NULL) && HasCTZSet) if (attimezone == NULL && HasCTZSet)
{ {
*tzp = CTimeZone; *tzp = CTimeZone;
tm->tm_isdst = 0; tm->tm_isdst = 0;
...@@ -1102,7 +1102,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn, ...@@ -1102,7 +1102,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
tm->tm_isdst = tx->tm_isdst; tm->tm_isdst = tx->tm_isdst;
tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone; tm->tm_zone = tx->tm_zone;
*tzp = -(tm->tm_gmtoff); *tzp = -tm->tm_gmtoff;
if (tzn != NULL) if (tzn != NULL)
*tzn = (char *) tm->tm_zone; *tzn = (char *) tm->tm_zone;
} }
...@@ -4146,7 +4146,7 @@ timestamptz_izone(PG_FUNCTION_ARGS) ...@@ -4146,7 +4146,7 @@ timestamptz_izone(PG_FUNCTION_ARGS)
#ifdef HAVE_INT64_TIMESTAMP #ifdef HAVE_INT64_TIMESTAMP
tz = -(zone->time / USECS_PER_SEC); tz = -(zone->time / USECS_PER_SEC);
#else #else
tz = -(zone->time); tz = -zone->time;
#endif #endif
result = dt2local(timestamp, tz); result = dt2local(timestamp, tz);
......
...@@ -1136,7 +1136,7 @@ DetermineLocalTimeZone(struct tm *tm) ...@@ -1136,7 +1136,7 @@ DetermineLocalTimeZone(struct tm *tm)
#if defined(HAVE_TM_ZONE) #if defined(HAVE_TM_ZONE)
/* tm_gmtoff is Sun/DEC-ism */ /* tm_gmtoff is Sun/DEC-ism */
tz = -(tmp->tm_gmtoff); tz = -tmp->tm_gmtoff;
#elif defined(HAVE_INT_TIMEZONE) #elif defined(HAVE_INT_TIMEZONE)
tz = (tmp->tm_isdst > 0) ? TIMEZONE_GLOBAL - SECS_PER_HOUR : TIMEZONE_GLOBAL; tz = (tmp->tm_isdst > 0) ? TIMEZONE_GLOBAL - SECS_PER_HOUR : TIMEZONE_GLOBAL;
#endif /* HAVE_INT_TIMEZONE */ #endif /* HAVE_INT_TIMEZONE */
......
...@@ -217,7 +217,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, char **tzn) ...@@ -217,7 +217,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, char **tzn)
tm->tm_gmtoff = tx->tm_gmtoff; tm->tm_gmtoff = tx->tm_gmtoff;
tm->tm_zone = tx->tm_zone; tm->tm_zone = tx->tm_zone;
*tzp = -(tm->tm_gmtoff); /* tm_gmtoff is Sun/DEC-ism */ *tzp = -tm->tm_gmtoff; /* tm_gmtoff is Sun/DEC-ism */
if (tzn != NULL) if (tzn != NULL)
*tzn = (char *) tm->tm_zone; *tzn = (char *) tm->tm_zone;
#elif defined(HAVE_INT_TIMEZONE) #elif defined(HAVE_INT_TIMEZONE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment