vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Mar 18 19:29:24 2013 +0200| [e5481369cc680330c9bceda6dc685d58ec29739f] | committer: Rémi Denis-Courmont
libvlc: remove potential logging from within config_LoadCmdLine() > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5481369cc680330c9bceda6dc685d58ec29739f --- src/misc/variables.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/misc/variables.c b/src/misc/variables.c index c438526..3054879 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -271,11 +271,10 @@ int var_Create( vlc_object_t *p_this, const char *psz_name, int i_type ) assert (0); } - if( i_type & VLC_VAR_DOINHERIT ) + if( (i_type & VLC_VAR_DOINHERIT) + && var_Inherit( p_this, psz_name, i_type, &p_var->val ) == 0 ) { - if( var_Inherit( p_this, psz_name, i_type, &p_var->val ) ) - msg_Err( p_this, "cannot inherit value for %s", psz_name ); - else if( i_type & VLC_VAR_HASCHOICE ) + if( i_type & VLC_VAR_HASCHOICE ) { /* We must add the inherited value to our choice list */ p_var->i_default = 0; @@ -1232,14 +1231,11 @@ int var_Inherit( vlc_object_t *p_this, const char *psz_name, int i_type, case VLC_VAR_BOOL: p_val->b_bool = config_GetInt( p_this, psz_name ); break; - case VLC_VAR_ADDRESS: - return VLC_ENOOBJ; default: - msg_Warn( p_this, "Could not inherit value for var %s " - "from config. Invalid Type", psz_name ); + assert(0); + case VLC_VAR_ADDRESS: return VLC_ENOOBJ; } - /*msg_Dbg( p_this, "Inherited value for var %s from config", psz_name );*/ return VLC_SUCCESS; } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
