[vlc-commits] variables: remove unused var_Destroy() return value
Rémi Denis-Courmont
git at videolan.org
Sat May 23 18:29:49 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 23 18:46:04 2015 +0300| [ddc97a84c68521425f60560f8f01265385acabda] | committer: Rémi Denis-Courmont
variables: remove unused var_Destroy() return value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ddc97a84c68521425f60560f8f01265385acabda
---
include/vlc_variables.h | 2 +-
src/misc/variables.c | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 1d1bf7f..bbb6197 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -141,7 +141,7 @@ enum {
VLC_API int var_Create( vlc_object_t *, const char *, int );
#define var_Create(a,b,c) var_Create( VLC_OBJECT(a), b, c )
-VLC_API int var_Destroy( vlc_object_t *, const char * );
+VLC_API void var_Destroy( vlc_object_t *, const char * );
#define var_Destroy(a,b) var_Destroy( VLC_OBJECT(a), b )
VLC_API int var_Change( vlc_object_t *, const char *, int, vlc_value_t *, vlc_value_t * );
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 5f25f8e..1be1f71 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -418,7 +418,6 @@ int var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
return ret;
}
-#undef var_Destroy
/**
* Destroy a vlc variable
*
@@ -428,7 +427,7 @@ int var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
* \param p_this The object that holds the variable
* \param psz_name The name of the variable
*/
-int var_Destroy( vlc_object_t *p_this, const char *psz_name )
+void (var_Destroy)(vlc_object_t *p_this, const char *psz_name)
{
variable_t *p_var;
@@ -440,7 +439,7 @@ int var_Destroy( vlc_object_t *p_this, const char *psz_name )
if( p_var == NULL )
{
vlc_mutex_unlock( &p_priv->var_lock );
- return VLC_ENOVAR;
+ return;
}
WaitUnused( p_this, p_var );
@@ -453,7 +452,6 @@ int var_Destroy( vlc_object_t *p_this, const char *psz_name )
if( p_var != NULL )
Destroy( p_var );
- return VLC_SUCCESS;
}
static void CleanupVar( void *var )
More information about the vlc-commits
mailing list