rem: n = ((param_func_t)(param->param_pointer)) (type, (param_func_param_t)(char*)val );
add: n = ((param_func_t)(param->param_pointer))(type, val );
context: int set_mod_param_regex(char* regex, char* name, modparam_t type, void* val){	struct sr_module* t;	param_export_t* param;	regex_t preg;	int mod_found, len;	char* reg;	int n;	len = strlen(regex);	reg = pkg_malloc(len + 2 + 1);	if (reg == 0) {		LOG(L_ERR, "set_mod_param_regex(): No memory left\n");		return -1;	}	reg[0] = '^';	memcpy(reg + 1, regex, len);	reg[len + 1] = '$';	reg[len + 2] = '\0';		if (regcomp(&preg, reg, REG_EXTENDED | REG_NOSUB | REG_ICASE)) {		LOG(L_ERR, "set_mod_param_regex(): Error while compiling regular expression\n");		pkg_free(reg);		return -2;	}		mod_found = 0;	for(t = modules; t; t = t->next) {		if (regexec(&preg, t->exports->name, 0, 0, 0) == 0) {			DBG("set_mod_param_regex: %s matches module %s\n",					regex, t->exports->name);			mod_found = 1;			for(param=t->exports->params;param && param->name ; param++) {				if ((strcmp(name, param->name) == 0) &&				( PARAM_TYPE_MASK(param->type) == type)) {					DBG("set_mod_param_regex: found <%s> in module %s [%s]\n",						name, t->exports->name, t->path);					if (param->type&USE_FUNC_PARAM) {						n = ((param_func_t)(param->param_pointer))							(type, (param_func_param_t)(char*)val );						if (n<0)							return -4;					} else {						switch(type) {							case STR_PARAM:								*((char**)(param->param_pointer)) =									strdup((char*)val);								break;							case INT_PARAM:								*((int*)(param->param_pointer)) =									(int)(long)val;								break;						}					}					break;				}			}			if (!param || !param->name) {				LOG(L_ERR, "set_mod_param_regex: parameter <%s> not found in module <%s>\n",				    name, t->exports->name);				regfree(&preg);				pkg_free(reg);				return -3;			}		}	}	regfree(&preg);	if (!mod_found) {		LOG(L_ERR, "set_mod_param_regex: No module matching %s found\n|", regex);		pkg_free(reg);		return -4;	}	pkg_free(reg);	return 0;}