zabbix-agent2/src/libs/zbxtrends/cache.c
/******************************************************************************
 *                                                                            *
 * Function: tfc_value_append                                                 *
 *                                                                            *
 * Purpose: append data to the tail of same item value list                   *
 *                                                                            *
 ******************************************************************************/
tfc_value_append

Purpose: append data to the tail of same item value list
tfc_value_append Purpose : append data to the tail of same item value list
static void	tfc_value_append(zbx_tfc_data_t *root, zbx_tfc_data_t *data)
{
	zbx_uint32_t	index, root_index;
	if (root->prev_value == (index = tfc_data_slot_index(data)))
		return;
	root_index = tfc_data_slot_index(root);
	data->next_value = root_index;
	data->prev_value = root->prev_value;
	root->prev_value = index;
	cache->slots[data->prev_value].data.next_value = index;
}
static void tfc_value_append ( zbx_tfc_data_t * root , zbx_tfc_data_t * data ) { zbx_uint32_t index , root_index ; if ( root -> prev_value == ( index = tfc_data_slot_index ( data ) ) ) return ; root_index = tfc_data_slot_index ( root ) ; data -> next_value = root_index ; data -> prev_value = root -> prev_value ; root -> prev_value = index ; cache -> slots [ data -> prev_value ] . data . next_value = index ; }
Function: tfc_value_append                                                 
                                                                            
 Purpose: append data to the tail of same item value list
Function : tfc_value_append Purpose : append data to the tail of same item value list