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.)
This commit is contained in:
Peter Eisentraut 2023-03-29 08:25:12 +02:00
parent 062a844424
commit 0d15afc875
11 changed files with 15 additions and 15 deletions

View File

@ -148,7 +148,7 @@ RestoreArchivedFile(char *path, const char *xlogfname,
Assert(strcmp(lastRestartPointFname, xlogfname) <= 0);
}
else
XLogFileName(lastRestartPointFname, 0, 0L, wal_segment_size);
XLogFileName(lastRestartPointFname, 0, 0, wal_segment_size);
/* Build the restore command to execute */
xlogRestoreCmd = BuildRestoreCommand(recoveryRestoreCommand,

View File

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

View File

@ -883,7 +883,7 @@ DoCopyTo(CopyToState cstate)
else
{
/* run the plan --- the dest receiver will send tuples */
ExecutorRun(cstate->queryDesc, ForwardScanDirection, 0L, true);
ExecutorRun(cstate->queryDesc, ForwardScanDirection, 0, true);
processed = ((DR_copy *) cstate->queryDesc->dest)->processed;
}

View File

@ -333,7 +333,7 @@ ExecCreateTableAs(ParseState *pstate, CreateTableAsStmt *stmt,
ExecutorStart(queryDesc, GetIntoRelEFlags(into));
/* run the plan to completion */
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
/* save the rowcount if we're given a qc to fill */
if (qc)

View File

@ -601,7 +601,7 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
dir = ForwardScanDirection;
/* run the plan */
ExecutorRun(queryDesc, dir, 0L, true);
ExecutorRun(queryDesc, dir, 0, true);
/* run cleanup too */
ExecutorFinish(queryDesc);

View File

@ -417,7 +417,7 @@ refresh_matview_datafill(DestReceiver *dest, Query *query,
ExecutorStart(queryDesc, 0);
/* run the plan */
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
processed = queryDesc->estate->es_processed;

View File

@ -417,7 +417,7 @@ PersistHoldablePortal(Portal portal)
NULL);
/* Fetch the result set into the tuplestore */
ExecutorRun(queryDesc, direction, 0L, false);
ExecutorRun(queryDesc, direction, 0, false);
queryDesc->dest->rDestroy(queryDesc->dest);
queryDesc->dest = NULL;

View File

@ -1072,7 +1072,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
if (innerFile != NULL)
{
if (BufFileSeek(innerFile, 0, 0L, SEEK_SET))
if (BufFileSeek(innerFile, 0, 0, SEEK_SET))
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not rewind hash-join temporary file")));
@ -1102,7 +1102,7 @@ ExecHashJoinNewBatch(HashJoinState *hjstate)
*/
if (hashtable->outerBatchFile[curbatch] != NULL)
{
if (BufFileSeek(hashtable->outerBatchFile[curbatch], 0, 0L, SEEK_SET))
if (BufFileSeek(hashtable->outerBatchFile[curbatch], 0, 0, SEEK_SET))
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not rewind hash-join temporary file")));

View File

@ -119,7 +119,7 @@ makeBufFileCommon(int nfiles)
file->dirty = false;
file->resowner = CurrentResourceOwner;
file->curFile = 0;
file->curOffset = 0L;
file->curOffset = 0;
file->pos = 0;
file->nbytes = 0;
@ -439,7 +439,7 @@ BufFileLoadBuffer(BufFile *file)
file->curFile + 1 < file->numFiles)
{
file->curFile++;
file->curOffset = 0L;
file->curOffset = 0;
}
thisfile = file->files[file->curFile];
@ -511,7 +511,7 @@ BufFileDumpBuffer(BufFile *file)
while (file->curFile + 1 >= file->numFiles)
extendBufFile(file);
file->curFile++;
file->curOffset = 0L;
file->curOffset = 0;
}
/*

View File

@ -157,7 +157,7 @@ ProcessQuery(PlannedStmt *plan,
/*
* Run the plan to completion.
*/
ExecutorRun(queryDesc, ForwardScanDirection, 0L, true);
ExecutorRun(queryDesc, ForwardScanDirection, 0, true);
/*
* Build command completion status data, if caller wants one.

View File

@ -1246,11 +1246,11 @@ tuplestore_rescan(Tuplestorestate *state)
case TSS_WRITEFILE:
readptr->eof_reached = false;
readptr->file = 0;
readptr->offset = 0L;
readptr->offset = 0;
break;
case TSS_READFILE:
readptr->eof_reached = false;
if (BufFileSeek(state->myfile, 0, 0L, SEEK_SET) != 0)
if (BufFileSeek(state->myfile, 0, 0, SEEK_SET) != 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not seek in tuplestore temporary file")));