dlink_node node;
};
-static MemAllocator *lru_node_pool = NULL;
+static MemAllocator *lru_node_pool = nullptr;
static int nr_lru_policies = 0;
static void
* but not be in the LRU list, so check for that case rather
* than suffer a NULL pointer access.
*/
- if (NULL == lru_node->node.data)
+ if (nullptr == lru_node->node.data)
return;
assert(lru_node->node.data == entry);
- node->data = NULL;
+ node->data = nullptr;
dlinkDelete(&lru_node->node, &lru->list);
LruNode *lru_node = lru_walk->current;
if (!lru_node)
- return NULL;
+ return nullptr;
lru_walk->current = (LruNode *) lru_node->node.next;
lru_node = lru_walker->current;
if (!lru_node || walker->scanned >= walker->max_scan)
- return NULL;
+ return nullptr;
walker->scanned += 1;
if (lru_walker->current == lru_walker->start) {
/* Last node found */
- lru_walker->current = NULL;
+ lru_walker->current = nullptr;
}
entry = (StoreEntry *) lru_node->node.data;
lru_node_pool->freeOne(lru_node);
lru->count -= 1;
- lru->setPolicyNode(entry, NULL);
+ lru->setPolicyNode(entry, nullptr);
return entry;
}