]> git.sesse.net Git - vlc/commitdiff
variables: use a more restrictive assert as all variable belong to a class.
authorRémi Duraffort <ivoire@videolan.org>
Sun, 2 Aug 2009 20:14:55 +0000 (22:14 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 3 Aug 2009 11:16:59 +0000 (13:16 +0200)
(and also remove an unneeded include).

src/misc/variables.c

index 74e99f89c7385888d975be50e05901a9d5aaa531..8c2ab50332401db2682e493c928f2af3de3f80c6 100644 (file)
@@ -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 )