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

Commit188c524

Browse files
committed
minor code cleanup - replace useless struct timezone argument togettimeofday with NULL in a few places, making it consistent withusage elsewhere.
1 parent6aad07d commit188c524

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.471 2005/10/20 20:05:44 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.472 2005/10/22 14:27:28 adunstan Exp $
4141
*
4242
* NOTES
4343
*
@@ -1148,9 +1148,8 @@ ServerLoop(void)
11481148
last_touch_time;
11491149
structtimevalearlier,
11501150
later;
1151-
structtimezonetz;
11521151

1153-
gettimeofday(&earlier,&tz);
1152+
gettimeofday(&earlier,NULL);
11541153
last_touch_time=time(NULL);
11551154

11561155
nSockets=initMasks(&readmask);
@@ -1207,7 +1206,7 @@ ServerLoop(void)
12071206
*/
12081207
while (random_seed==0)
12091208
{
1210-
gettimeofday(&later,&tz);
1209+
gettimeofday(&later,NULL);
12111210

12121211
/*
12131212
* We are not sure how much precision is in tv_usec, so we

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.145 2005/10/15 02:49:29momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.146 2005/10/22 14:27:29adunstan Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1584,14 +1584,13 @@ Datum
15841584
timeofday(PG_FUNCTION_ARGS)
15851585
{
15861586
structtimevaltp;
1587-
structtimezonetpz;
15881587
chartempl[128];
15891588
charbuf[128];
15901589
text*result;
15911590
intlen;
15921591
pg_time_ttt;
15931592

1594-
gettimeofday(&tp,&tpz);
1593+
gettimeofday(&tp,NULL);
15951594
tt= (pg_time_t)tp.tv_sec;
15961595
pg_strftime(templ,sizeof(templ),"%a %b %d %H:%M:%S.%%06d %Y %Z",
15971596
pg_localtime(&tt,global_timezone));

‎src/backend/utils/misc/pg_rusage.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.2 2005/10/15 02:49:36 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/utils/misc/pg_rusage.c,v 1.3 2005/10/22 14:27:29 adunstan Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -26,10 +26,8 @@
2626
void
2727
pg_rusage_init(PGRUsage*ru0)
2828
{
29-
structtimezonetz;
30-
3129
getrusage(RUSAGE_SELF,&ru0->ru);
32-
gettimeofday(&ru0->tv,&tz);
30+
gettimeofday(&ru0->tv,NULL);
3331
}
3432

3533
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp