- int i_level = var_GetInteger( p_filter, psz_option );
- if( i_level >= CHAIN_LEVEL_MAX )
- {
- msg_Err( p_filter, "Too high level of recursion (%d)", i_level );
- return VLC_EGENERIC;
- }
- var_SetInteger( p_filter, psz_option, i_level + 1 );
+
+ /* */
+ int i_ret = VLC_EGENERIC;
+
+ /* */
+ config_chain_t cfg_level;
+ memset(&cfg_level, 0, sizeof(cfg_level));
+ cfg_level.psz_name = strdup(psz_option);
+ if( asprintf( &cfg_level.psz_value, "%d", i_level + 1) < 0 )
+ cfg_level.psz_value = NULL;
+ if( !cfg_level.psz_name || !cfg_level.psz_value )
+ goto exit;