[vlc-devel] commit: variables: checking the class is enough to ensure the type ( all variable of the ( Rémi Duraffort )
git version control
git at videolan.org
Thu Aug 27 13:26:23 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Aug 27 12:19:19 2009 +0200| [cfe1332bca231bc76f8835d4cfdb06cfd198b53b] | committer: Rémi Duraffort
variables: checking the class is enough to ensure the type (all variable of the
same class are represented by the same global type)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cfe1332bca231bc76f8835d4cfdb06cfd198b53b
---
src/misc/variables.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 8c2ab50..737956f 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -194,7 +194,7 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
if( i_new >= 0 )
{
/* If the types differ, variable creation failed. */
- if( (i_type & VLC_VAR_TYPE) != (p_priv->p_vars[i_new].i_type & VLC_VAR_TYPE) )
+ if( (i_type & VLC_VAR_CLASS) != (p_priv->p_vars[i_new].i_type & VLC_VAR_CLASS) )
{
msg_Err( p_this, "Variable '%s' (0x%04x) already exist but with a different type (0x%04x)",
psz_name, p_priv->p_vars[i_new].i_type, i_type );
@@ -371,10 +371,7 @@ int __var_Destroy( vlc_object_t *p_this, const char *psz_name )
}
/* Free callbacks if needed */
- if( p_var->p_entries )
- {
- free( p_var->p_entries );
- }
+ free( p_var->p_entries );
free( p_var->psz_name );
free( p_var->psz_text );
More information about the vlc-devel
mailing list