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

Commit3974c4a

Browse files
committed
Remove useless "return;" lines
Discussion:https://postgr.es/m/20191128144653.GA27883@alvherre.pgsql
1 parent8a7e9e9 commit3974c4a

File tree

40 files changed

+0
-96
lines changed

40 files changed

+0
-96
lines changed

‎contrib/fuzzystrmatch/fuzzystrmatch.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,6 @@ _metaphone(char *word,/* IN */
698698
}/* END FOR */
699699

700700
End_Phoned_Word;
701-
702-
return;
703701
}/* END metaphone */
704702

705703

‎contrib/ltree/ltxtquery_io.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)
192192
*(state->curop)='\0';
193193
state->curop++;
194194
state->sumlen+=lenval+1;
195-
return;
196195
}
197196

198197
#defineSTACKDEPTH32

‎contrib/pg_standby/pg_standby.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ CheckForExternalTrigger(void)
545545

546546
fprintf(stderr,"WARNING: invalid content in \"%s\"\n",triggerPath);
547547
fflush(stderr);
548-
return;
549548
}
550549

551550
/*

‎contrib/pgcrypto/mbuf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ prepare_room(MBuf *mbuf, int block_len)
9494
mbuf->data_end=newbuf+ (mbuf->data_end-mbuf->data);
9595
mbuf->read_pos=newbuf+ (mbuf->read_pos-mbuf->data);
9696
mbuf->data=newbuf;
97-
98-
return;
9997
}
10098

10199
int

‎contrib/seg/seg.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,6 @@ rt_seg_size(SEG *a, float *size)
706706
*size=0.0;
707707
else
708708
*size= (float)Abs(a->upper-a->lower);
709-
710-
return;
711709
}
712710

713711
Datum

‎contrib/sepgsql/selinux.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,6 @@ sepgsql_compute_avd(const char *scontext,
809809
if (avd_ex.auditdeny&av_code_ex)
810810
avd->auditdeny |=av_code;
811811
}
812-
813-
return;
814812
}
815813

816814
/*

‎src/backend/access/gist/gist.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,6 @@ gistFindCorrectParent(Relation r, GISTInsertStack *child)
10881088
LockBuffer(child->parent->buffer,GIST_EXCLUSIVE);
10891089
gistFindCorrectParent(r,child);
10901090
}
1091-
1092-
return;
10931091
}
10941092

10951093
/*

‎src/backend/access/rmgrdesc/genericdesc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ generic_desc(StringInfo buf, XLogReaderState *record)
4343
else
4444
appendStringInfo(buf,"offset %u, length %u",offset,length);
4545
}
46-
47-
return;
4846
}
4947

5048
/*

‎src/backend/access/transam/twophase.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,4 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
24362436
if (gxact->ondisk)
24372437
RemoveTwoPhaseFile(xid,giveWarning);
24382438
RemoveGXact(gxact);
2439-
2440-
return;
24412439
}

‎src/backend/access/transam/xact.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3428,7 +3428,6 @@ CheckTransactionBlock(bool isTopLevel, bool throwError, const char *stmtType)
34283428
/* translator: %s represents an SQL statement name */
34293429
errmsg("%s can only be used in transaction blocks",
34303430
stmtType)));
3431-
return;
34323431
}
34333432

34343433
/*

‎src/backend/executor/nodeTableFuncscan.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ tfuncFetchRows(TableFuncScanState *tstate, ExprContext *econtext)
335335

336336
MemoryContextSwitchTo(oldcxt);
337337
MemoryContextReset(tstate->perTableCxt);
338-
339-
return;
340338
}
341339

342340
/*

‎src/backend/jit/llvm/llvmjit.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,6 @@ llvm_create_types(void)
834834
* Leave the module alive, otherwise references to function would be
835835
* dangling.
836836
*/
837-
838-
return;
839837
}
840838

841839
/*

‎src/backend/libpq/hba.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2903,7 +2903,6 @@ check_ident_usermap(IdentLine *identLine, const char *usermap_name,
29032903
*found_p= true;
29042904
}
29052905
}
2906-
return;
29072906
}
29082907

29092908

‎src/backend/replication/logical/launcher.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ WaitForReplicationWorkerAttach(LogicalRepWorker *worker,
223223
CHECK_FOR_INTERRUPTS();
224224
}
225225
}
226-
227-
return;
228226
}
229227

230228
/*

‎src/backend/replication/walsender.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,6 @@ WalSndLoop(WalSndSendDataCallback send_data)
23012301
WAIT_EVENT_WAL_SENDER_MAIN);
23022302
}
23032303
}
2304-
return;
23052304
}
23062305

23072306
/* Initialize a per-walsender data structure for this walsender process */
@@ -2757,8 +2756,6 @@ XLogSendPhysical(void)
27572756
(uint32) (sentPtr >>32), (uint32)sentPtr);
27582757
set_ps_display(activitymsg, false);
27592758
}
2760-
2761-
return;
27622759
}
27632760

27642761
/*

‎src/backend/rewrite/rowsecurity.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,6 @@ get_row_security_policies(Query *root, RangeTblEntry *rte, int rt_index,
394394
* when necessary (eg: role changes)
395395
*/
396396
*hasRowSecurity= true;
397-
398-
return;
399397
}
400398

401399
/*

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ j2date(int jd, int *year, int *month, int *day)
313313
quad=julian*2141 /65536;
314314
*day=julian-7834*quad /256;
315315
*month= (quad+10) %MONTHS_PER_YEAR+1;
316-
317-
return;
318316
}/* j2date() */
319317

320318

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ free_readfile(char **optlines)
422422
free(curr_line);
423423

424424
free(optlines);
425-
426-
return;
427425
}
428426

429427
/*

‎src/bin/pg_dump/compress_io.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ WriteDataToArchive(ArchiveHandle *AH, CompressorState *cs,
192192
WriteDataToArchiveNone(AH,cs,data,dLen);
193193
break;
194194
}
195-
return;
196195
}
197196

198197
/*
@@ -308,8 +307,6 @@ WriteDataToArchiveZlib(ArchiveHandle *AH, CompressorState *cs,
308307
cs->zp->next_in= (void*)unconstify(char*,data);
309308
cs->zp->avail_in=dLen;
310309
DeflateCompressorZlib(AH,cs, false);
311-
312-
return;
313310
}
314311

315312
staticvoid
@@ -407,7 +404,6 @@ WriteDataToArchiveNone(ArchiveHandle *AH, CompressorState *cs,
407404
constchar*data,size_tdLen)
408405
{
409406
cs->writeF(AH,data,dLen);
410-
return;
411407
}
412408

413409

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,6 @@ WriteData(Archive *AHX, const void *data, size_t dLen)
10451045
fatal("internal error -- WriteData cannot be called outside the context of a DataDumper routine");
10461046

10471047
AH->WriteDataPtr(AH,data,dLen);
1048-
1049-
return;
10501048
}
10511049

10521050
/*
@@ -1461,7 +1459,6 @@ void
14611459
archputs(constchar*s,Archive*AH)
14621460
{
14631461
WriteData(AH,s,strlen(s));
1464-
return;
14651462
}
14661463

14671464
/* Public */
@@ -1736,8 +1733,6 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
17361733

17371734
if (bytes_written!=size*nmemb)
17381735
WRITE_ERROR_EXIT;
1739-
1740-
return;
17411736
}
17421737

17431738
/* on some error, we may decide to go on... */

‎src/bin/pg_dump/pg_backup_custom.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,6 @@ _WriteData(ArchiveHandle *AH, const void *data, size_t dLen)
317317
if (dLen>0)
318318
/* WriteDataToArchive() internally throws write errors */
319319
WriteDataToArchive(AH,cs,data,dLen);
320-
321-
return;
322320
}
323321

324322
/*
@@ -644,8 +642,6 @@ _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len)
644642
if (fwrite(buf,1,len,AH->FH)!=len)
645643
WRITE_ERROR_EXIT;
646644
ctx->filePos+=len;
647-
648-
return;
649645
}
650646

651647
/*
@@ -663,8 +659,6 @@ _ReadBuf(ArchiveHandle *AH, void *buf, size_t len)
663659
if (fread(buf,1,len,AH->FH)!=len)
664660
READ_ERROR_EXIT(AH->FH);
665661
ctx->filePos+=len;
666-
667-
return;
668662
}
669663

670664
/*
@@ -945,7 +939,6 @@ _CustomWriteFunc(ArchiveHandle *AH, const char *buf, size_t len)
945939
WriteInt(AH,len);
946940
_WriteBuf(AH,buf,len);
947941
}
948-
return;
949942
}
950943

951944
/*

‎src/bin/pg_dump/pg_backup_directory.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,6 @@ _WriteData(ArchiveHandle *AH, const void *data, size_t dLen)
349349
if (dLen>0&&cfwrite(data,dLen,ctx->dataFH)!=dLen)
350350
fatal("could not write to output file: %s",
351351
get_cfp_error(ctx->dataFH));
352-
353-
354-
return;
355352
}
356353

357354
/*
@@ -517,8 +514,6 @@ _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len)
517514
if (cfwrite(buf,len,ctx->dataFH)!=len)
518515
fatal("could not write to output file: %s",
519516
get_cfp_error(ctx->dataFH));
520-
521-
return;
522517
}
523518

524519
/*
@@ -537,8 +532,6 @@ _ReadBuf(ArchiveHandle *AH, void *buf, size_t len)
537532
*/
538533
if (cfread(buf,len,ctx->dataFH)!=len)
539534
fatal("could not read from input file: end of file");
540-
541-
return;
542535
}
543536

544537
/*

‎src/bin/pg_dump/pg_backup_null.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ _WriteData(ArchiveHandle *AH, const void *data, size_t dLen)
8686
{
8787
/* Just send it to output, ahwrite() already errors on failure */
8888
ahwrite(data,1,dLen,AH);
89-
return;
9089
}
9190

9291
/*
@@ -109,7 +108,6 @@ _WriteBlobData(ArchiveHandle *AH, const void *data, size_t dLen)
109108

110109
destroyPQExpBuffer(buf);
111110
}
112-
return;
113111
}
114112

115113
staticvoid
@@ -221,7 +219,6 @@ static void
221219
_WriteBuf(ArchiveHandle*AH,constvoid*buf,size_tlen)
222220
{
223221
/* Don't do anything */
224-
return;
225222
}
226223

227224
staticvoid

‎src/bin/pg_dump/pg_backup_tar.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,6 @@ _WriteData(ArchiveHandle *AH, const void *data, size_t dLen)
615615

616616
if (tarWrite(data,dLen,tctx->TH)!=dLen)
617617
WRITE_ERROR_EXIT;
618-
619-
return;
620618
}
621619

622620
staticvoid
@@ -818,7 +816,6 @@ _ReadBuf(ArchiveHandle *AH, void *buf, size_t len)
818816
fatal("could not read from input file: end of file");
819817

820818
ctx->filePos+=len;
821-
return;
822819
}
823820

824821
staticvoid

‎src/bin/pg_dump/pg_dump.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15416,8 +15416,6 @@ dumpTable(Archive *fout, TableInfo *tbinfo)
1541615416
}
1541715417

1541815418
free(namecopy);
15419-
15420-
return;
1542115419
}
1542215420

1542315421
/*

‎src/bin/pg_upgrade/parallel.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ parallel_exec_prog(const char *log_file, const char *opt_log_file,
148148
thread_handles[parallel_jobs-1]=child;
149149
#endif
150150
}
151-
152-
return;
153151
}
154152

155153

@@ -263,8 +261,6 @@ parallel_transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
263261
thread_handles[parallel_jobs-1]=child;
264262
#endif
265263
}
266-
267-
return;
268264
}
269265

270266

‎src/bin/pg_upgrade/relfilenode.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ transfer_all_new_tablespaces(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
7373

7474
end_progress_output();
7575
check_ok();
76-
77-
return;
7876
}
7977

8078

@@ -128,8 +126,6 @@ transfer_all_new_dbs(DbInfoArr *old_db_arr, DbInfoArr *new_db_arr,
128126
/* We allocate something even for n_maps == 0 */
129127
pg_free(mappings);
130128
}
131-
132-
return;
133129
}
134130

135131
/*

‎src/bin/pg_upgrade/tablespace.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ get_tablespace_paths(void)
100100
PQclear(res);
101101

102102
PQfinish(conn);
103-
104-
return;
105103
}
106104

107105

‎src/bin/psql/common.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,8 +2399,6 @@ expand_tilde(char **filename)
23992399
}
24002400
}
24012401
#endif
2402-
2403-
return;
24042402
}
24052403

24062404
/*

‎src/fe_utils/print.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,8 +3619,6 @@ refresh_utf8format(const printTableOpt *opt)
36193619
popt->wrap_left=unicode_style.wrap_left;
36203620
popt->wrap_right=unicode_style.wrap_right;
36213621
popt->wrap_right_border=unicode_style.wrap_right_border;
3622-
3623-
return;
36243622
}
36253623

36263624
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp