zabbix-agent2/src/libs/zbxdbcache/dbconfig.c
/******************************************************************************
 *                                                                            *
 * Function: dc_regexp_remove_expression                                      *
 *                                                                            *
 * Purpose: removes expression from regexp                                    *
 *                                                                            *
 ******************************************************************************/
dc_regexp_remove_expression

Purpose: removes expression from regexp
dc_regexp_remove_expression Purpose : removes expression from regexp
static ZBX_DC_REGEXP	*dc_regexp_remove_expression(const char *regexp_name, zbx_uint64_t expressionid)
{
	ZBX_DC_REGEXP	*regexp, regexp_local;
	int		index;
	regexp_local.name = regexp_name;
	if (NULL == (regexp = (ZBX_DC_REGEXP *)zbx_hashset_search(&config->regexps, &regexp_local)))
		return NULL;
	if (FAIL == (index = zbx_vector_uint64_search(&regexp->expressionids, expressionid,
			ZBX_DEFAULT_UINT64_COMPARE_FUNC)))
	{
		return NULL;
	}
	zbx_vector_uint64_remove_noorder(&regexp->expressionids, index);
	return regexp;
}
static ZBX_DC_REGEXP * dc_regexp_remove_expression ( const char * regexp_name , zbx_uint64_t expressionid ) { ZBX_DC_REGEXP * regexp , regexp_local ; int index ; regexp_local . name = regexp_name ; if ( NULL == ( regexp = ( ZBX_DC_REGEXP * ) zbx_hashset_search ( & config -> regexps , & regexp_local ) ) ) return NULL ; if ( FAIL == ( index = zbx_vector_uint64_search ( & regexp -> expressionids , expressionid , ZBX_DEFAULT_UINT64_COMPARE_FUNC ) ) ) { return NULL ; } zbx_vector_uint64_remove_noorder ( & regexp -> expressionids , index ) ; return regexp ; }
Function: dc_regexp_remove_expression                                      
                                                                            
 Purpose: removes expression from regexp
Function : dc_regexp_remove_expression Purpose : removes expression from regexp