[vlc-commits] variables: fix pointer aliasing
Rémi Denis-Courmont
git at videolan.org
Sun Oct 27 19:24:01 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 27 20:13:28 2019 +0200| [e88dc93615c19b027028f481c078e08ee8f09932] | committer: Rémi Denis-Courmont
variables: fix pointer aliasing
Tree functions return pointers to void pointers.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e88dc93615c19b027028f481c078e08ee8f09932
---
src/misc/variables.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index a39fd4143f..ed284cf4f4 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -148,7 +148,7 @@ static int varcmp( const void *a, const void *b )
static variable_t *Lookup( vlc_object_t *obj, const char *psz_name )
{
vlc_object_internals_t *priv = vlc_internals( obj );
- variable_t **pp_var;
+ void **pp_var;
vlc_mutex_lock(&priv->var_lock);
pp_var = tfind( &psz_name, &priv->var_root, varcmp );
@@ -352,7 +352,8 @@ int (var_Create)( vlc_object_t *p_this, const char *psz_name, int i_type )
var_Inherit(p_this, psz_name, i_type, &p_var->val);
vlc_object_internals_t *p_priv = vlc_internals( p_this );
- variable_t **pp_var, *p_oldvar;
+ void **pp_var;
+ variable_t *p_oldvar;
int ret = VLC_SUCCESS;
vlc_mutex_lock( &p_priv->var_lock );
More information about the vlc-commits
mailing list