/* Searches through the linked list with memory pools to find a pool that was created to hold blocks that are of the exact size as specified by the parameter.  */
static tPoolNode * TbxMemPoolListFind(size_t blockSize)
/* Searches through the linked list with memory pools to find a pool that was created to hold blocks that are of the exact size as specified by the parameter.  */
static tPoolNode * TbxMemPoolListFind(size_t blockSize)
{
  tPoolNode * result = NULL;
  tPoolNode * poolNodePtr;
  TBX_ASSERT(blockSize > 0U);
  if (blockSize > 0U)
  {
    poolNodePtr = tbxPoolList;
    while (poolNodePtr != NULL)
    {
      if (poolNodePtr->poolPtr->blockSize == blockSize)
      {
        result = poolNodePtr;
        break;
      }
      poolNodePtr = poolNodePtr->nextNodePtr;
    }
  }
  return result;
}