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:
parent
9e0dc83e87
commit
99b052a38a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user