zabbix-agent2/src/libs/zbxtrends/cache.c
/******************************************************************************
 *                                                                            *
 * Function: tfc_free_data                                                    *
 *                                                                            *
 * Purpose: frees slot used to store trends function data                     *
 *                                                                            *
 ******************************************************************************/
tfc_free_data

Purpose: frees slot used to store trends function data
tfc_free_data Purpose : frees slot used to store trends function data
static void	tfc_free_data(zbx_tfc_data_t *data)
{
	tfc_lru_remove(data);
	tfc_value_remove(data);
	if (data->prev_value == data->next_value)
	{
		zbx_hashset_remove_direct(&cache->index, &cache->slots[data->prev_value].data);
		cache->items_num--;
	}
	zbx_hashset_remove_direct(&cache->index, data);
}
static void tfc_free_data ( zbx_tfc_data_t * data ) { tfc_lru_remove ( data ) ; tfc_value_remove ( data ) ; if ( data -> prev_value == data -> next_value ) { zbx_hashset_remove_direct ( & cache -> index , & cache -> slots [ data -> prev_value ] . data ) ; cache -> items_num -- ; } zbx_hashset_remove_direct ( & cache -> index , data ) ; }
Function: tfc_free_data                                                    
                                                                            
 Purpose: frees slot used to store trends function data
Function : tfc_free_data Purpose : frees slot used to store trends function data