Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3758aff

Browse files
committed
More removal of unneeded parentheses.
1 parentca256f3 commit3758aff

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎src/backend/utils/adt/timestamp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.140 2005/07/2215:15:38 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.141 2005/07/2219:00:54 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1006,7 +1006,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
10061006
* specified. Go ahead and rotate to the local time zone since we will
10071007
* later bypass any calls which adjust the tm fields.
10081008
*/
1009-
if ((attimezone==NULL)&&HasCTZSet&&(tzp!=NULL))
1009+
if (attimezone==NULL&&HasCTZSet&&tzp!=NULL)
10101010
{
10111011
#ifdefHAVE_INT64_TIMESTAMP
10121012
dt-=CTimeZone*USECS_PER_SEC;
@@ -1059,7 +1059,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
10591059
* We have a brute force time zone per SQL99? Then use it without
10601060
* change since we have already rotated to the time zone.
10611061
*/
1062-
if ((attimezone==NULL)&&HasCTZSet)
1062+
if (attimezone==NULL&&HasCTZSet)
10631063
{
10641064
*tzp=CTimeZone;
10651065
tm->tm_isdst=0;
@@ -1102,7 +1102,7 @@ timestamp2tm(Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, char **tzn,
11021102
tm->tm_isdst=tx->tm_isdst;
11031103
tm->tm_gmtoff=tx->tm_gmtoff;
11041104
tm->tm_zone=tx->tm_zone;
1105-
*tzp=-(tm->tm_gmtoff);
1105+
*tzp=-tm->tm_gmtoff;
11061106
if (tzn!=NULL)
11071107
*tzn= (char*)tm->tm_zone;
11081108
}
@@ -4146,7 +4146,7 @@ timestamptz_izone(PG_FUNCTION_ARGS)
41464146
#ifdefHAVE_INT64_TIMESTAMP
41474147
tz=-(zone->time /USECS_PER_SEC);
41484148
#else
4149-
tz=-(zone->time);
4149+
tz=-zone->time;
41504150
#endif
41514151

41524152
result=dt2local(timestamp,tz);

‎src/interfaces/ecpg/pgtypeslib/dt_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ DetermineLocalTimeZone(struct tm *tm)
11361136

11371137
#if defined(HAVE_TM_ZONE)
11381138
/* tm_gmtoff is Sun/DEC-ism */
1139-
tz=-(tmp->tm_gmtoff);
1139+
tz=-tmp->tm_gmtoff;
11401140
#elif defined(HAVE_INT_TIMEZONE)
11411141
tz= (tmp->tm_isdst>0) ?TIMEZONE_GLOBAL-SECS_PER_HOUR :TIMEZONE_GLOBAL;
11421142
#endif/* HAVE_INT_TIMEZONE */

‎src/interfaces/ecpg/pgtypeslib/timestamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ timestamp2tm(timestamp dt, int *tzp, struct tm *tm, fsec_t *fsec, char **tzn)
217217
tm->tm_gmtoff=tx->tm_gmtoff;
218218
tm->tm_zone=tx->tm_zone;
219219

220-
*tzp=-(tm->tm_gmtoff);/* tm_gmtoff is Sun/DEC-ism */
220+
*tzp=-tm->tm_gmtoff;/* tm_gmtoff is Sun/DEC-ism */
221221
if (tzn!=NULL)
222222
*tzn= (char*)tm->tm_zone;
223223
#elif defined(HAVE_INT_TIMEZONE)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp