mirror of
https://github.com/postgres/postgres.git
synced 2025-11-16 15:02:33 +03:00
Remove un-needed braces around single statements.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.8 1997/09/08 20:57:46 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.9 1998/06/15 19:29:51 momjian Exp $
|
||||
*
|
||||
* NOTE
|
||||
* XXX This is a preliminary implementation which lacks fail-fast
|
||||
@@ -130,9 +130,7 @@ AllocSetReset(AllocSet set)
|
||||
AssertArg(AllocSetIsValid(set));
|
||||
|
||||
while (AllocPointerIsValid(pointer = AllocSetGetFirst(set)))
|
||||
{
|
||||
AllocSetFree(set, pointer);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NOT_USED
|
||||
@@ -144,9 +142,7 @@ AllocSetReset_debug(char *file, int line, AllocSet set)
|
||||
AssertArg(AllocSetIsValid(set));
|
||||
|
||||
while (AllocPointerIsValid(pointer = AllocSetGetFirst(set)))
|
||||
{
|
||||
AllocSetFree(set, pointer);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -189,9 +185,7 @@ AllocSetAlloc(AllocSet set, Size size)
|
||||
alloc = (AllocElem) malloc(sizeof(*alloc) + size);
|
||||
|
||||
if (!PointerIsValid(alloc))
|
||||
{
|
||||
elog(FATAL, "palloc failure: memory exhausted");
|
||||
}
|
||||
|
||||
/* add to allocation list */
|
||||
OrderedElemPushInto(&alloc->elemData, &set->setData);
|
||||
@@ -298,9 +292,7 @@ AllocSetIterate(AllocSet set,
|
||||
{
|
||||
|
||||
if (PointerIsValid(function))
|
||||
{
|
||||
(*function) (pointer);
|
||||
}
|
||||
count += 1;
|
||||
}
|
||||
|
||||
@@ -319,9 +311,7 @@ AllocSetCount(AllocSet set)
|
||||
for (pointer = AllocSetGetFirst(set);
|
||||
AllocPointerIsValid(pointer);
|
||||
pointer = AllocPointerGetNext(pointer))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -346,9 +336,7 @@ AllocSetGetFirst(AllocSet set)
|
||||
alloc = (AllocElem) OrderedSetGetHead(&set->setData);
|
||||
|
||||
if (!AllocElemIsValid(alloc))
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
return (AllocElemGetAllocPointer(alloc));
|
||||
}
|
||||
@@ -369,9 +357,7 @@ AllocPointerGetNext(AllocPointer pointer)
|
||||
OrderedElemGetSuccessor(&AllocPointerGetAllocElem(pointer)->elemData);
|
||||
|
||||
if (!AllocElemIsValid(alloc))
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
return (AllocElemGetAllocPointer(alloc));
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.7 1998/02/26 04:38:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.8 1998/06/15 19:29:52 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -151,9 +151,7 @@ EnableMemoryContext(bool on)
|
||||
AssertArg(BoolIsValid(on));
|
||||
|
||||
if (BypassEnable(&MemoryContextEnableCount, on))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
processing = true;
|
||||
|
||||
@@ -188,9 +186,7 @@ EnableMemoryContext(bool on)
|
||||
OrderedElemPop(&TopGlobalMemoryData.elemData);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalMemoryDestroy(context);
|
||||
}
|
||||
/* what is needed for the top? */
|
||||
}
|
||||
|
||||
@@ -493,15 +489,11 @@ GlobalMemoryDump(GlobalMemory this)
|
||||
|
||||
context = (GlobalMemory) OrderedElemGetPredecessor(&this->elemData);
|
||||
if (PointerIsValid(context))
|
||||
{
|
||||
printf("\tpredecessor=%s\n", GlobalMemoryGetName(context));
|
||||
}
|
||||
|
||||
context = (GlobalMemory) OrderedElemGetSuccessor(&this->elemData);
|
||||
if (PointerIsValid(context))
|
||||
{
|
||||
printf("\tsucessor=%s\n", GlobalMemoryGetName(context));
|
||||
}
|
||||
|
||||
AllocSetDump(&this->setData); /* XXX is this right interface */
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.7 1998/02/11 19:13:17 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.8 1998/06/15 19:29:53 momjian Exp $
|
||||
*
|
||||
* NOTE
|
||||
* XXX This is a preliminary implementation which lacks fail-fast
|
||||
@@ -68,9 +68,7 @@ OrderedSetGetHead(OrderedSet set)
|
||||
|
||||
elem = set->head;
|
||||
if (elem->next)
|
||||
{
|
||||
return (OrderedElemGetBase(elem));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -85,9 +83,7 @@ OrderedSetGetTail(OrderedSet set)
|
||||
|
||||
elem = set->tail;
|
||||
if (elem->prev)
|
||||
{
|
||||
return (OrderedElemGetBase(elem));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -101,9 +97,7 @@ OrderedElemGetPredecessor(OrderedElem elem)
|
||||
{
|
||||
elem = elem->prev;
|
||||
if (elem->prev)
|
||||
{
|
||||
return (OrderedElemGetBase(elem));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -115,9 +109,7 @@ OrderedElemGetSuccessor(OrderedElem elem)
|
||||
{
|
||||
elem = elem->next;
|
||||
if (elem->next)
|
||||
{
|
||||
return (OrderedElemGetBase(elem));
|
||||
}
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.11 1998/06/15 18:39:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.12 1998/06/15 19:29:53 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -594,9 +594,7 @@ GetPortalByName(char *name)
|
||||
AssertState(PortalManagerEnabled);
|
||||
|
||||
if (PointerIsValid(name))
|
||||
{
|
||||
PortalHashTableLookup(name, portal);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!PortalIsValid(BlankPortal))
|
||||
|
||||
Reference in New Issue
Block a user