1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Update enum formatting and NULL test to project style.

This commit is contained in:
Cynthia Shang 2020-02-25 17:25:12 -05:00 committed by David Steele
parent 9e0dc83e87
commit 99b052a38a

View File

@ -13,7 +13,12 @@ Memory Context Manager
/***********************************************************************************************************************************
Memory context states
***********************************************************************************************************************************/
typedef enum {memContextStateFree = 0, memContextStateFreeing, memContextStateActive} MemContextState;
typedef enum
{
memContextStateFree = 0,
memContextStateFreeing,
memContextStateActive
} MemContextState;
/***********************************************************************************************************************************
Contains information about a memory allocation
@ -185,7 +190,7 @@ memContextNewIndex(MemContext *memContext, bool allowFree)
// Try to find space for the new context
for (; memContext->contextChildFreeIdx < memContext->contextChildListSize; memContext->contextChildFreeIdx++)
{
if (!memContext->contextChildList[memContext->contextChildFreeIdx] ||
if (memContext->contextChildList[memContext->contextChildFreeIdx] == NULL ||
(allowFree && memContext->contextChildList[memContext->contextChildFreeIdx]->state == memContextStateFree))
{
break;