mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Cleanup of source files where 'return' or 'var =' is alone on a line.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.47 1999/01/24 22:53:25 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.48 1999/02/03 21:15:27 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The old interface functions have been converted to macros
|
||||
@@ -759,8 +759,7 @@ heap_modifytuple(HeapTuple tuple,
|
||||
|
||||
if (repl[attoff] == ' ')
|
||||
{
|
||||
value[attoff] =
|
||||
heap_getattr(tuple,
|
||||
value[attoff] = heap_getattr(tuple,
|
||||
AttrOffsetGetAttrNumber(attoff),
|
||||
RelationGetDescr(relation),
|
||||
&isNull);
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.46 1998/12/14 05:18:30 scrappy Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.47 1999/02/03 21:15:27 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the executor utility code such as "ExecTypeFromTL" should be
|
||||
@@ -115,8 +115,7 @@ CreateTupleDescCopy(TupleDesc tupdesc)
|
||||
desc->attrs = (Form_pg_attribute *) palloc(size);
|
||||
for (i = 0; i < desc->natts; i++)
|
||||
{
|
||||
desc->attrs[i] =
|
||||
(Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
|
||||
desc->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
|
||||
memmove(desc->attrs[i],
|
||||
tupdesc->attrs[i],
|
||||
ATTRIBUTE_TUPLE_SIZE);
|
||||
@@ -150,8 +149,7 @@ CreateTupleDescCopyConstr(TupleDesc tupdesc)
|
||||
desc->attrs = (Form_pg_attribute *) palloc(size);
|
||||
for (i = 0; i < desc->natts; i++)
|
||||
{
|
||||
desc->attrs[i] =
|
||||
(Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
|
||||
desc->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE);
|
||||
memmove(desc->attrs[i],
|
||||
tupdesc->attrs[i],
|
||||
ATTRIBUTE_TUPLE_SIZE);
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.23 1998/11/27 19:51:31 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.24 1999/02/03 21:15:28 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains only the public interface routines.
|
||||
@@ -485,8 +485,7 @@ hashrestrpos(IndexScanDesc scan)
|
||||
/* bump lock on currentMarkData and copy to currentItemData */
|
||||
if (ItemPointerIsValid(&(scan->currentMarkData)))
|
||||
{
|
||||
so->hashso_curbuf =
|
||||
_hash_getbuf(scan->relation,
|
||||
so->hashso_curbuf =_hash_getbuf(scan->relation,
|
||||
BufferGetBlockNumber(so->hashso_mrkbuf),
|
||||
HASH_READ);
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.18 1998/10/04 20:19:08 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.19 1999/02/03 21:15:28 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Overflow pages look like ordinary relation pages.
|
||||
@@ -336,8 +336,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
|
||||
{
|
||||
Buffer prevbuf = _hash_getbuf(rel, prevblkno, HASH_WRITE);
|
||||
Page prevpage = BufferGetPage(prevbuf);
|
||||
HashPageOpaque prevopaque =
|
||||
(HashPageOpaque) PageGetSpecialPointer(prevpage);
|
||||
HashPageOpaque prevopaque = (HashPageOpaque) PageGetSpecialPointer(prevpage);
|
||||
|
||||
_hash_checkpage(prevpage, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE);
|
||||
Assert(prevopaque->hasho_bucket == bucket);
|
||||
@@ -348,8 +347,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
|
||||
{
|
||||
Buffer nextbuf = _hash_getbuf(rel, nextblkno, HASH_WRITE);
|
||||
Page nextpage = BufferGetPage(nextbuf);
|
||||
HashPageOpaque nextopaque =
|
||||
(HashPageOpaque) PageGetSpecialPointer(nextpage);
|
||||
HashPageOpaque nextopaque = (HashPageOpaque) PageGetSpecialPointer(nextpage);
|
||||
|
||||
_hash_checkpage(nextpage, LH_OVERFLOW_PAGE);
|
||||
Assert(nextopaque->hasho_bucket == bucket);
|
||||
@@ -363,8 +361,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
|
||||
* element hashm_mapp[bitmappage].
|
||||
*/
|
||||
splitnum = (addr >> SPLITSHIFT);
|
||||
ovflpgno =
|
||||
(splitnum ? metap->SPARES[splitnum - 1] : 0) + (addr & SPLITMASK) - 1;
|
||||
ovflpgno = (splitnum ? metap->SPARES[splitnum - 1] : 0) + (addr & SPLITMASK) - 1;
|
||||
|
||||
if (ovflpgno < metap->LAST_FREED)
|
||||
metap->LAST_FREED = ovflpgno;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.29 1998/09/23 04:21:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.30 1999/02/03 21:15:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -293,8 +293,7 @@ RelationGetStrategy(Relation relation,
|
||||
Assert(StrategyEvaluationIsValid(evaluation));
|
||||
Assert(RegProcedureIsValid(procedure));
|
||||
|
||||
strategyMap =
|
||||
IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
|
||||
strategyMap = IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
|
||||
evaluation->maxStrategy,
|
||||
attributeNumber);
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.33 1999/01/29 09:22:52 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.34 1999/02/03 21:15:32 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1200,8 +1200,7 @@ _bt_pgaddtup(Relation rel,
|
||||
|
||||
do
|
||||
{
|
||||
chkitem =
|
||||
(BTItem) PageGetItem(page, PageGetItemId(page, itup_off));
|
||||
chkitem = (BTItem) PageGetItem(page, PageGetItemId(page, itup_off));
|
||||
itup_off = OffsetNumberNext(itup_off);
|
||||
} while (!BTItemSame(chkitem, afteritem));
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Id: nbtsort.c,v 1.34 1999/01/17 06:18:12 momjian Exp $
|
||||
* $Id: nbtsort.c,v 1.35 1999/02/03 21:15:36 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -559,20 +559,16 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
|
||||
btspool->bts_tape = 0;
|
||||
btspool->isunique = isunique;
|
||||
|
||||
btspool->bts_itape =
|
||||
(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes);
|
||||
btspool->bts_otape =
|
||||
(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes);
|
||||
btspool->bts_itape =(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes);
|
||||
btspool->bts_otape =(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes);
|
||||
if (btspool->bts_itape == (BTTapeBlock **) NULL ||
|
||||
btspool->bts_otape == (BTTapeBlock **) NULL)
|
||||
elog(ERROR, "_bt_spoolinit: out of memory");
|
||||
|
||||
for (i = 0; i < ntapes; ++i)
|
||||
{
|
||||
btspool->bts_itape[i] =
|
||||
_bt_tapecreate(mktemp(strcpy(fname, TAPETEMP)));
|
||||
btspool->bts_otape[i] =
|
||||
_bt_tapecreate(mktemp(strcpy(fname, TAPETEMP)));
|
||||
btspool->bts_itape[i] = _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP)));
|
||||
btspool->bts_otape[i] = _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP)));
|
||||
}
|
||||
pfree((void *) fname);
|
||||
|
||||
@@ -698,8 +694,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
|
||||
*/
|
||||
if (it_ntup > 0)
|
||||
{
|
||||
parray =
|
||||
(BTSortKey *) palloc(it_ntup * sizeof(BTSortKey));
|
||||
parray = (BTSortKey *) palloc(it_ntup * sizeof(BTSortKey));
|
||||
pos = itape->bttb_data;
|
||||
for (i = 0; i < it_ntup; ++i)
|
||||
_bt_setsortkey(index, _bt_tapenext(itape, &pos), &(parray[i]));
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.23 1998/09/07 05:35:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.24 1999/02/03 21:15:36 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -258,8 +258,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
|
||||
if (init[j])
|
||||
{
|
||||
/* yup, use the appropriate value */
|
||||
test =
|
||||
(long) FMGR_PTR2(&cur->sk_func, cur->sk_argument, xform[j].sk_argument);
|
||||
test = (long) FMGR_PTR2(&cur->sk_func, cur->sk_argument, xform[j].sk_argument);
|
||||
if (test)
|
||||
xform[j].sk_argument = cur->sk_argument;
|
||||
else if (j == (BTEqualStrategyNumber - 1))
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.20 1998/12/15 12:45:29 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.21 1999/02/03 21:15:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -141,8 +141,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
|
||||
s->opaque = p;
|
||||
if (s->numberOfKeys > 0)
|
||||
{
|
||||
p->s_internalKey =
|
||||
(ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys);
|
||||
p->s_internalKey = (ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys);
|
||||
|
||||
/*
|
||||
* Scans on internal pages use different operators than they
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.21 1998/12/16 11:53:44 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.22 1999/02/03 21:15:41 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains the high level access-method interface to the
|
||||
@@ -497,8 +497,7 @@ TransactionIdDidCommit(TransactionId transactionId)
|
||||
if (AMI_OVERRIDE)
|
||||
return true;
|
||||
|
||||
return
|
||||
TransactionLogTest(transactionId, XID_COMMIT);
|
||||
return TransactionLogTest(transactionId, XID_COMMIT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -515,8 +514,7 @@ TransactionIdDidAbort(TransactionId transactionId)
|
||||
if (AMI_OVERRIDE)
|
||||
return false;
|
||||
|
||||
return
|
||||
TransactionLogTest(transactionId, XID_ABORT);
|
||||
return TransactionLogTest(transactionId, XID_ABORT);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -532,8 +530,7 @@ TransactionIdIsInProgress(TransactionId transactionId)
|
||||
if (AMI_OVERRIDE)
|
||||
return false;
|
||||
|
||||
return
|
||||
TransactionLogTest(transactionId, XID_INPROGRESS);
|
||||
return TransactionLogTest(transactionId, XID_INPROGRESS);
|
||||
}
|
||||
*/
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.18 1998/12/15 12:45:33 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.19 1999/02/03 21:15:45 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* This file contains support functions for the high
|
||||
@@ -315,8 +315,7 @@ TransBlockNumberGetXidStatus(Relation relation,
|
||||
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
|
||||
ReleaseBuffer(buffer);
|
||||
|
||||
return
|
||||
xstatus;
|
||||
return xstatus;
|
||||
}
|
||||
|
||||
/* --------------------------------
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.30 1999/02/02 03:44:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.31 1999/02/03 21:15:45 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction aborts can now occur two ways:
|
||||
@@ -191,8 +191,7 @@ TransactionStateData CurrentTransactionStateData = {
|
||||
TBLOCK_DEFAULT /* transaction block state */
|
||||
};
|
||||
|
||||
TransactionState CurrentTransactionState =
|
||||
&CurrentTransactionStateData;
|
||||
TransactionState CurrentTransactionState = &CurrentTransactionStateData;
|
||||
|
||||
int DefaultXactIsoLevel = XACT_READ_COMMITTED;
|
||||
int XactIsoLevel;
|
||||
@@ -467,8 +466,7 @@ CommandIdIsCurrentCommandId(CommandId cid)
|
||||
if (AMI_OVERRIDE)
|
||||
return false;
|
||||
|
||||
return
|
||||
(cid == s->commandId) ? true : false;
|
||||
return (cid == s->commandId) ? true : false;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -479,8 +477,7 @@ CommandIdGEScanCommandId(CommandId cid)
|
||||
if (AMI_OVERRIDE)
|
||||
return false;
|
||||
|
||||
return
|
||||
(cid >= s->scanCommandId) ? true : false;
|
||||
return (cid >= s->scanCommandId) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -511,8 +508,7 @@ CommandCounterIncrement()
|
||||
elog(ERROR, "You may only have 2^32-1 commands per transaction");
|
||||
}
|
||||
|
||||
CurrentTransactionStateData.scanCommandId =
|
||||
CurrentTransactionStateData.commandId;
|
||||
CurrentTransactionStateData.scanCommandId = CurrentTransactionStateData.commandId;
|
||||
|
||||
/* make cache changes visible to me */
|
||||
AtCommit_Cache();
|
||||
|
Reference in New Issue
Block a user