zabbix-agent2/src/zabbix_server/service/service_manager.c
/******************************************************************************
 *                                                                            *
 * Function: services_get_weight                                              *
 *                                                                            *
 * Purpose: get total weight of all specified services                        *
 *                                                                            *
 ******************************************************************************/
services_get_weight

Purpose: get total weight of all specified services
services_get_weight Purpose : get total weight of all specified services
static int	services_get_weight(const zbx_vector_ptr_t *services)
{
	int	i, weight = 0;
	for (i = 0; i < services->values_num; i++)
	{
		zbx_service_t	*service = (zbx_service_t *)services->values[i];
		weight += service->weight;
	}
	return weight;
}
static int services_get_weight ( const zbx_vector_ptr_t * services ) { int i , weight = 0 ; for ( i = 0 ; i < services -> values_num ; i ++ ) { zbx_service_t * service = ( zbx_service_t * ) services -> values [ i ] ; weight += service -> weight ; } return weight ; }
Function: services_get_weight                                              
                                                                            
 Purpose: get total weight of all specified services
Function : services_get_weight Purpose : get total weight of all specified services