Skip to content

Commit 0cbc429

Browse files
committed
Calculate new memory pool size with macro
1 parent aa67ab5 commit 0cbc429

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sys/pool.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ void *XPool_Alloc(xpool_t *pPool, size_t nSize)
8080
// Create new pool if next is not found
8181
if (pPool->pNext == NULL)
8282
{
83-
size_t nNewSize = nSize > pPool->nSize ?
84-
nSize : pPool->nSize;
85-
83+
size_t nNewSize = XSTD_MAX(nSize, pPool->nSize);
8684
pPool->pNext = XPool_Create(nNewSize);
8785
if (pPool->pNext == NULL) return NULL;
8886
}

0 commit comments

Comments
 (0)