Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0d15afc

Browse files
committed
Simplify useless 0L constants
In ancient times, these belonged to arguments or fields that were actually of type long, but now they are not anymore, so this "L" decoration is just confusing. (Some other 0L and other "L" constants remain, where they are actually associated with a long type.)
1 parent 062a844 commit 0d15afc

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

src/backend/access/transam/xlogarchive.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ RestoreArchivedFile(char *path, const char *xlogfname,
148148
Assert(strcmp(lastRestartPointFname, xlogfname) <= 0);
149149
}
150150
else
151-
XLogFileName(lastRestartPointFname, 0, 0L, wal_segment_size);
151+
XLogFileName(lastRestartPointFname, 0, 0, wal_segment_size);
152152

153153
/* Build the restore command to execute */
154154
xlogRestoreCmd = BuildRestoreCommand(recoveryRestoreCommand,

src/backend/backup/backup_manifest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ SendBackupManifest(backup_manifest_info *manifest, bbsink *sink)
349349
* We've written all the data to the manifest file. Rewind the file so
350350
* that we can read it all back.
351351
*/
352-
if (BufFileSeek(manifest->buffile, 0, 0L, SEEK_SET))
352+
if (BufFileSeek(manifest->buffile, 0, 0, SEEK_SET))
353353
ereport(ERROR,
354354
(errcode_for_file_access(),
355355
errmsg("could not rewind temporary file")));

src/backend/commands/copyto.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ DoCopyTo(CopyToState cstate)
883883
else
884884
{
885885
/* run the plan --- the dest receiver will send tuples */
886-
ExecutorRun(cstate->queryDesc, ForwardScanDirection, 0L, true);
886+
ExecutorRun(cstate->queryDesc, ForwardScanDirection, 0, true);
887887
processed = ((DR_copy *) cstate->queryDesc->dest)->processed;
888888
}
889889

src/backend/commands/createas.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ ExecCreateTableAs(ParseState *pstate, CreateTableAsStmt *stmt,
333333
ExecutorStart(queryDesc, GetIntoRelEFlags(into));
334334

335335
/* run the plan to completion */
336-
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
336+
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
337337

338338
/* save the rowcount if we're given a qc to fill */
339339
if (qc)

src/backend/commands/explain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
601601
dir = ForwardScanDirection;
602602

603603
/* run the plan */
604-
ExecutorRun(queryDesc, dir, 0L, true);
604+
ExecutorRun(queryDesc, dir, 0, true);
605605

606606
/* run cleanup too */
607607
ExecutorFinish(queryDesc);

src/backend/commands/matview.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ refresh_matview_datafill(DestReceiver *dest, Query *query,
417417
ExecutorStart(queryDesc, 0);
418418

419419
/* run the plan */
420-
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
420+
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
421421

422422
processed = queryDesc->estate->es_processed;
423423

src/backend/commands/portalcmds.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ PersistHoldablePortal(Portal portal)
417417
NULL);
418418

419419
/* Fetch the result set into the tuplestore */
420-
ExecutorRun(queryDesc, direction, 0L, false);
420+
ExecutorRun(queryDesc, direction, 0, false);
421421

422422
queryDesc->dest->rDestroy(queryDesc->dest);
423423
queryDesc->dest = NULL;

src/backend/executor/nodeHashjoin.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
10721072

10731073
if (innerFile != NULL)
10741074
{
1075-
if (BufFileSeek(innerFile, 0, 0L, SEEK_SET))
1075+
if (BufFileSeek(innerFile, 0, 0, SEEK_SET))
10761076
ereport(ERROR,
10771077
(errcode_for_file_access(),
10781078
errmsg("could not rewind hash-join temporary file")));
@@ -1102,7 +1102,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
11021102
*/
11031103
if (hashtable->outerBatchFile[curbatch] != NULL)
11041104
{
1105-
if (BufFileSeek(hashtable->outerBatchFile[curbatch], 0, 0L, SEEK_SET))
1105+
if (BufFileSeek(hashtable->outerBatchFile[curbatch], 0, 0, SEEK_SET))
11061106
ereport(ERROR,
11071107
(errcode_for_file_access(),
11081108
errmsg("could not rewind hash-join temporary file")));

src/backend/storage/file/buffile.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ makeBufFileCommon(int nfiles)
119119
file->dirty = false;
120120
file->resowner = CurrentResourceOwner;
121121
file->curFile = 0;
122-
file->curOffset = 0L;
122+
file->curOffset = 0;
123123
file->pos = 0;
124124
file->nbytes = 0;
125125

@@ -439,7 +439,7 @@ BufFileLoadBuffer(BufFile *file)
439439
file->curFile + 1 < file->numFiles)
440440
{
441441
file->curFile++;
442-
file->curOffset = 0L;
442+
file->curOffset = 0;
443443
}
444444

445445
thisfile = file->files[file->curFile];
@@ -511,7 +511,7 @@ BufFileDumpBuffer(BufFile *file)
511511
while (file->curFile + 1 >= file->numFiles)
512512
extendBufFile(file);
513513
file->curFile++;
514-
file->curOffset = 0L;
514+
file->curOffset = 0;
515515
}
516516

517517
/*

src/backend/tcop/pquery.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ ProcessQuery(PlannedStmt *plan,
157157
/*
158158
* Run the plan to completion.
159159
*/
160-
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
160+
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
161161

162162
/*
163163
* Build command completion status data, if caller wants one.

src/backend/utils/sort/tuplestore.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1246,11 +1246,11 @@ tuplestore_rescan(Tuplestorestate *state)
12461246
case TSS_WRITEFILE:
12471247
readptr->eof_reached = false;
12481248
readptr->file = 0;
1249-
readptr->offset = 0L;
1249+
readptr->offset = 0;
12501250
break;
12511251
case TSS_READFILE:
12521252
readptr->eof_reached = false;
1253-
if (BufFileSeek(state->myfile, 0, 0L, SEEK_SET) != 0)
1253+
if (BufFileSeek(state->myfile, 0, 0, SEEK_SET) != 0)
12541254
ereport(ERROR,
12551255
(errcode_for_file_access(),
12561256
errmsg("could not seek in tuplestore temporary file")));

0 commit comments

Comments
 (0)