[vlc-devel] commit: variables: use a more restrictive assert as all variable belong to a class. ( Rémi Duraffort )
git version control
git at videolan.org
Mon Aug 3 13:37:36 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Aug 2 22:14:55 2009 +0200| [3d428266d6b1ba2145aa4768550ba1f85ed83021] | committer: Rémi Duraffort
variables: use a more restrictive assert as all variable belong to a class.
(and also remove an unneeded include).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d428266d6b1ba2145aa4768550ba1f85ed83021
---
src/misc/variables.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 74e99f8..8c2ab50 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -33,7 +33,6 @@
#include "libvlc.h"
-#include "vlc_interface.h"
#include <assert.h>
/*****************************************************************************
@@ -776,7 +775,7 @@ int var_SetChecked( vlc_object_t *p_this, const char *psz_name,
}
p_var = &p_priv->p_vars[i_var];
- assert( (p_var->i_type & VLC_VAR_CLASS) == 0 || expected_type == 0 ||
+ assert( expected_type == 0 ||
(p_var->i_type & VLC_VAR_CLASS) == expected_type );
/* Duplicate data if needed */
@@ -829,7 +828,7 @@ int var_GetChecked( vlc_object_t *p_this, const char *psz_name,
{
variable_t *p_var = &p_priv->p_vars[i_var];
- assert( (p_var->i_type & VLC_VAR_CLASS) == 0 || expected_type == 0 ||
+ assert( expected_type == 0 ||
(p_var->i_type & VLC_VAR_CLASS) == expected_type );
/* Really get the variable */
@@ -1134,7 +1133,7 @@ void var_OptionParse( vlc_object_t *p_obj, const char *psz_option,
goto cleanup;
}
- var_Set( p_obj, psz_name, val );
+ __var_Set( p_obj, psz_name, val );
/* If that's a list, remove all elements allocated */
if( i_type == VLC_VAR_LIST )
More information about the vlc-devel
mailing list