zabbix-agent2/src/libs/zbxtrends/cache.c
/******************************************************************************
 *                                                                            *
 * Function: tfc_lru_remove                                                   *
 *                                                                            *
 * Purpose: remove data from least recently used slot list                    *
 *                                                                            *
 ******************************************************************************/
tfc_lru_remove

Purpose: remove data from least recently used slot list
tfc_lru_remove Purpose : remove data from least recently used slot list
static void	tfc_lru_remove(zbx_tfc_data_t *data)
{
	if (UINT32_MAX != data->prev)
		cache->slots[data->prev].data.next = data->next;
	else
		cache->lru_head = data->next;
	if (UINT32_MAX != data->next)
		cache->slots[data->next].data.prev = data->prev;
	else
		cache->lru_tail = data->prev;
}
static void tfc_lru_remove ( zbx_tfc_data_t * data ) { if ( UINT32_MAX != data -> prev ) cache -> slots [ data -> prev ] . data . next = data -> next ; else cache -> lru_head = data -> next ; if ( UINT32_MAX != data -> next ) cache -> slots [ data -> next ] . data . prev = data -> prev ; else cache -> lru_tail = data -> prev ; }
Function: tfc_lru_remove                                                   
                                                                            
 Purpose: remove data from least recently used slot list
Function : tfc_lru_remove Purpose : remove data from least recently used slot list