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

Commit9322950

Browse files
committed
Cleanup of source files where 'return' or 'var =' is alone on a line.
1 parent3982368 commit9322950

File tree

101 files changed

+422
-743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+422
-743
lines changed

‎src/backend/access/common/heaptuple.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.47 1999/01/24 22:53:25 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.48 1999/02/03 21:15:27 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -759,8 +759,7 @@ heap_modifytuple(HeapTuple tuple,
759759

760760
if (repl[attoff]==' ')
761761
{
762-
value[attoff]=
763-
heap_getattr(tuple,
762+
value[attoff]=heap_getattr(tuple,
764763
AttrOffsetGetAttrNumber(attoff),
765764
RelationGetDescr(relation),
766765
&isNull);

‎src/backend/access/common/tupdesc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.46 1998/12/14 05:18:30 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.47 1999/02/03 21:15:27 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -115,8 +115,7 @@ CreateTupleDescCopy(TupleDesc tupdesc)
115115
desc->attrs= (Form_pg_attribute*)palloc(size);
116116
for (i=0;i<desc->natts;i++)
117117
{
118-
desc->attrs[i]=
119-
(Form_pg_attribute)palloc(ATTRIBUTE_TUPLE_SIZE);
118+
desc->attrs[i]= (Form_pg_attribute)palloc(ATTRIBUTE_TUPLE_SIZE);
120119
memmove(desc->attrs[i],
121120
tupdesc->attrs[i],
122121
ATTRIBUTE_TUPLE_SIZE);
@@ -150,8 +149,7 @@ CreateTupleDescCopyConstr(TupleDesc tupdesc)
150149
desc->attrs= (Form_pg_attribute*)palloc(size);
151150
for (i=0;i<desc->natts;i++)
152151
{
153-
desc->attrs[i]=
154-
(Form_pg_attribute)palloc(ATTRIBUTE_TUPLE_SIZE);
152+
desc->attrs[i]= (Form_pg_attribute)palloc(ATTRIBUTE_TUPLE_SIZE);
155153
memmove(desc->attrs[i],
156154
tupdesc->attrs[i],
157155
ATTRIBUTE_TUPLE_SIZE);

‎src/backend/access/hash/hash.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.23 1998/11/27 19:51:31 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.24 1999/02/03 21:15:28 momjian Exp $
1111
*
1212
* NOTES
1313
* This file contains only the public interface routines.
@@ -485,8 +485,7 @@ hashrestrpos(IndexScanDesc scan)
485485
/* bump lock on currentMarkData and copy to currentItemData */
486486
if (ItemPointerIsValid(&(scan->currentMarkData)))
487487
{
488-
so->hashso_curbuf=
489-
_hash_getbuf(scan->relation,
488+
so->hashso_curbuf=_hash_getbuf(scan->relation,
490489
BufferGetBlockNumber(so->hashso_mrkbuf),
491490
HASH_READ);
492491

‎src/backend/access/hash/hashovfl.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.18 1998/10/04 20:19:08 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.19 1999/02/03 21:15:28 momjian Exp $
1111
*
1212
* NOTES
1313
* Overflow pages look like ordinary relation pages.
@@ -336,8 +336,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
336336
{
337337
Bufferprevbuf=_hash_getbuf(rel,prevblkno,HASH_WRITE);
338338
Pageprevpage=BufferGetPage(prevbuf);
339-
HashPageOpaqueprevopaque=
340-
(HashPageOpaque)PageGetSpecialPointer(prevpage);
339+
HashPageOpaqueprevopaque= (HashPageOpaque)PageGetSpecialPointer(prevpage);
341340

342341
_hash_checkpage(prevpage,LH_BUCKET_PAGE |LH_OVERFLOW_PAGE);
343342
Assert(prevopaque->hasho_bucket==bucket);
@@ -348,8 +347,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
348347
{
349348
Buffernextbuf=_hash_getbuf(rel,nextblkno,HASH_WRITE);
350349
Pagenextpage=BufferGetPage(nextbuf);
351-
HashPageOpaquenextopaque=
352-
(HashPageOpaque)PageGetSpecialPointer(nextpage);
350+
HashPageOpaquenextopaque= (HashPageOpaque)PageGetSpecialPointer(nextpage);
353351

354352
_hash_checkpage(nextpage,LH_OVERFLOW_PAGE);
355353
Assert(nextopaque->hasho_bucket==bucket);
@@ -363,8 +361,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
363361
* element hashm_mapp[bitmappage].
364362
*/
365363
splitnum= (addr >>SPLITSHIFT);
366-
ovflpgno=
367-
(splitnum ?metap->SPARES[splitnum-1] :0)+ (addr&SPLITMASK)-1;
364+
ovflpgno= (splitnum ?metap->SPARES[splitnum-1] :0)+ (addr&SPLITMASK)-1;
368365

369366
if (ovflpgno<metap->LAST_FREED)
370367
metap->LAST_FREED=ovflpgno;

‎src/backend/access/index/istrat.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.29 1998/09/23 04:21:57 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.30 1999/02/0321:15:30 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -293,8 +293,7 @@ RelationGetStrategy(Relation relation,
293293
Assert(StrategyEvaluationIsValid(evaluation));
294294
Assert(RegProcedureIsValid(procedure));
295295

296-
strategyMap=
297-
IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
296+
strategyMap=IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
298297
evaluation->maxStrategy,
299298
attributeNumber);
300299

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.33 1999/01/29 09:22:52 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.34 1999/02/03 21:15:32 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1200,8 +1200,7 @@ _bt_pgaddtup(Relation rel,
12001200

12011201
do
12021202
{
1203-
chkitem=
1204-
(BTItem)PageGetItem(page,PageGetItemId(page,itup_off));
1203+
chkitem= (BTItem)PageGetItem(page,PageGetItemId(page,itup_off));
12051204
itup_off=OffsetNumberNext(itup_off);
12061205
}while (!BTItemSame(chkitem,afteritem));
12071206
}

‎src/backend/access/nbtree/nbtsort.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*
77
* IDENTIFICATION
8-
* $Id: nbtsort.c,v 1.34 1999/01/17 06:18:12 momjian Exp $
8+
* $Id: nbtsort.c,v 1.35 1999/02/03 21:15:36 momjian Exp $
99
*
1010
* NOTES
1111
*
@@ -559,20 +559,16 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
559559
btspool->bts_tape=0;
560560
btspool->isunique=isunique;
561561

562-
btspool->bts_itape=
563-
(BTTapeBlock**)palloc(sizeof(BTTapeBlock*)*ntapes);
564-
btspool->bts_otape=
565-
(BTTapeBlock**)palloc(sizeof(BTTapeBlock*)*ntapes);
562+
btspool->bts_itape=(BTTapeBlock**)palloc(sizeof(BTTapeBlock*)*ntapes);
563+
btspool->bts_otape=(BTTapeBlock**)palloc(sizeof(BTTapeBlock*)*ntapes);
566564
if (btspool->bts_itape== (BTTapeBlock**)NULL||
567565
btspool->bts_otape== (BTTapeBlock**)NULL)
568566
elog(ERROR,"_bt_spoolinit: out of memory");
569567

570568
for (i=0;i<ntapes;++i)
571569
{
572-
btspool->bts_itape[i]=
573-
_bt_tapecreate(mktemp(strcpy(fname,TAPETEMP)));
574-
btspool->bts_otape[i]=
575-
_bt_tapecreate(mktemp(strcpy(fname,TAPETEMP)));
570+
btspool->bts_itape[i]=_bt_tapecreate(mktemp(strcpy(fname,TAPETEMP)));
571+
btspool->bts_otape[i]=_bt_tapecreate(mktemp(strcpy(fname,TAPETEMP)));
576572
}
577573
pfree((void*)fname);
578574

@@ -698,8 +694,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
698694
*/
699695
if (it_ntup>0)
700696
{
701-
parray=
702-
(BTSortKey*)palloc(it_ntup*sizeof(BTSortKey));
697+
parray= (BTSortKey*)palloc(it_ntup*sizeof(BTSortKey));
703698
pos=itape->bttb_data;
704699
for (i=0;i<it_ntup;++i)
705700
_bt_setsortkey(index,_bt_tapenext(itape,&pos),&(parray[i]));

‎src/backend/access/nbtree/nbtutils.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.23 1998/09/07 05:35:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.24 1999/02/03 21:15:36 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -258,8 +258,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
258258
if (init[j])
259259
{
260260
/* yup, use the appropriate value */
261-
test=
262-
(long)FMGR_PTR2(&cur->sk_func,cur->sk_argument,xform[j].sk_argument);
261+
test= (long)FMGR_PTR2(&cur->sk_func,cur->sk_argument,xform[j].sk_argument);
263262
if (test)
264263
xform[j].sk_argument=cur->sk_argument;
265264
elseif (j== (BTEqualStrategyNumber-1))

‎src/backend/access/rtree/rtscan.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.20 1998/12/15 12:45:29 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.21 1999/02/03 21:15:37 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -141,8 +141,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
141141
s->opaque=p;
142142
if (s->numberOfKeys>0)
143143
{
144-
p->s_internalKey=
145-
(ScanKey)palloc(sizeof(ScanKeyData)*s->numberOfKeys);
144+
p->s_internalKey= (ScanKey)palloc(sizeof(ScanKeyData)*s->numberOfKeys);
146145

147146
/*
148147
* Scans on internal pages use different operators than they

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.21 1998/12/16 11:53:44 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.22 1999/02/03 21:15:41 momjian Exp $
1111
*
1212
* NOTES
1313
* This file contains the high level access-method interface to the
@@ -497,8 +497,7 @@ TransactionIdDidCommit(TransactionId transactionId)
497497
if (AMI_OVERRIDE)
498498
return true;
499499

500-
return
501-
TransactionLogTest(transactionId,XID_COMMIT);
500+
returnTransactionLogTest(transactionId,XID_COMMIT);
502501
}
503502

504503
/*
@@ -515,8 +514,7 @@ TransactionIdDidAbort(TransactionId transactionId)
515514
if (AMI_OVERRIDE)
516515
return false;
517516

518-
return
519-
TransactionLogTest(transactionId,XID_ABORT);
517+
returnTransactionLogTest(transactionId,XID_ABORT);
520518
}
521519

522520
/*
@@ -532,8 +530,7 @@ TransactionIdIsInProgress(TransactionId transactionId)
532530
if (AMI_OVERRIDE)
533531
return false;
534532
535-
return
536-
TransactionLogTest(transactionId, XID_INPROGRESS);
533+
return TransactionLogTest(transactionId, XID_INPROGRESS);
537534
}
538535
*/
539536

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.18 1998/12/15 12:45:33 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.19 1999/02/03 21:15:45 momjian Exp $
1111
*
1212
* NOTES
1313
* This file contains support functions for the high
@@ -315,8 +315,7 @@ TransBlockNumberGetXidStatus(Relation relation,
315315
LockBuffer(buffer,BUFFER_LOCK_UNLOCK);
316316
ReleaseBuffer(buffer);
317317

318-
return
319-
xstatus;
318+
returnxstatus;
320319
}
321320

322321
/* --------------------------------

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.30 1999/02/02 03:44:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.31 1999/02/03 21:15:45 momjian Exp $
1111
*
1212
* NOTES
1313
*Transaction aborts can now occur two ways:
@@ -191,8 +191,7 @@ TransactionStateData CurrentTransactionStateData = {
191191
TBLOCK_DEFAULT/* transaction block state */
192192
};
193193

194-
TransactionStateCurrentTransactionState=
195-
&CurrentTransactionStateData;
194+
TransactionStateCurrentTransactionState=&CurrentTransactionStateData;
196195

197196
intDefaultXactIsoLevel=XACT_READ_COMMITTED;
198197
intXactIsoLevel;
@@ -467,8 +466,7 @@ CommandIdIsCurrentCommandId(CommandId cid)
467466
if (AMI_OVERRIDE)
468467
return false;
469468

470-
return
471-
(cid==s->commandId) ? true : false;
469+
return (cid==s->commandId) ? true : false;
472470
}
473471

474472
bool
@@ -479,8 +477,7 @@ CommandIdGEScanCommandId(CommandId cid)
479477
if (AMI_OVERRIDE)
480478
return false;
481479

482-
return
483-
(cid >=s->scanCommandId) ? true : false;
480+
return (cid >=s->scanCommandId) ? true : false;
484481
}
485482

486483

@@ -511,8 +508,7 @@ CommandCounterIncrement()
511508
elog(ERROR,"You may only have 2^32-1 commands per transaction");
512509
}
513510

514-
CurrentTransactionStateData.scanCommandId=
515-
CurrentTransactionStateData.commandId;
511+
CurrentTransactionStateData.scanCommandId=CurrentTransactionStateData.commandId;
516512

517513
/* make cache changes visible to me */
518514
AtCommit_Cache();

‎src/backend/bootstrap/bootstrap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.53 1999/01/17 06:18:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.54 1999/02/03 21:15:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -855,8 +855,7 @@ gettype(char *type)
855855
staticForm_pg_attribute/* XXX */
856856
AllocateAttribute()
857857
{
858-
Form_pg_attributeattribute=
859-
(Form_pg_attribute)malloc(ATTRIBUTE_TUPLE_SIZE);
858+
Form_pg_attributeattribute= (Form_pg_attribute)malloc(ATTRIBUTE_TUPLE_SIZE);
860859

861860
if (!PointerIsValid(attribute))
862861
elog(FATAL,"AllocateAttribute: malloc failed");

‎src/backend/catalog/heap.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.71 1999/02/02 03:44:08 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.72 1999/02/03 21:15:54 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -130,8 +130,7 @@ static FormData_pg_attribute a6 = {
130130
MaxCommandIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
131131
};
132132

133-
staticForm_pg_attributeHeapAtt[]=
134-
{&a1,&a2,&a3,&a4,&a5,&a6};
133+
staticForm_pg_attributeHeapAtt[]= {&a1,&a2,&a3,&a4,&a5,&a6};
135134

136135
/* ----------------------------------------------------------------
137136
*XXX END OF UGLY HARD CODED BADNESS XXX

‎src/backend/catalog/index.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.68 1999/02/02 03:44:13 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.69 1999/02/03 21:15:54 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -436,8 +436,7 @@ ConstructIndexReldesc(Relation indexRelation, Oid amoid)
436436

437437
oldcxt=MemoryContextSwitchTo((MemoryContext)CacheCxt);
438438

439-
indexRelation->rd_am=
440-
AccessMethodObjectIdGetForm(amoid);
439+
indexRelation->rd_am=AccessMethodObjectIdGetForm(amoid);
441440

442441
MemoryContextSwitchTo(oldcxt);
443442

@@ -802,8 +801,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
802801
newPred=NULL;
803802
if (predicate!=NULL)
804803
{
805-
newPred=
806-
(Node*)make_orclause(lcons(make_andclause((List*)predicate),
804+
newPred= (Node*)make_orclause(lcons(make_andclause((List*)predicate),
807805
lcons(make_andclause((List*)oldPred),
808806
NIL)));
809807
newPred= (Node*)cnfify((Expr*)newPred, true);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp