[vlc-commits] variables: move last msg_*() call with the variable lock

Rémi Denis-Courmont git at videolan.org
Mon Nov 5 21:45:43 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov  5 22:44:05 2012 +0200| [303f40131375521744c9c7ed1b3f14aa42201982] | committer: Rémi Denis-Courmont

variables: move last msg_*() call with the variable lock

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=303f40131375521744c9c7ed1b3f14aa42201982
---

 src/misc/variables.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/misc/variables.c b/src/misc/variables.c
index 138b664..7473b6d 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -846,11 +846,9 @@ int var_AddCallback( vlc_object_t *p_this, const char *psz_name,
     p_var = Lookup( p_this, psz_name );
     if( p_var == NULL )
     {
-#ifndef NDEBUG
-        msg_Warn( p_this, "Failed to add a callback to the non-existing "
-                          "variable '%s'", psz_name );
-#endif
         vlc_mutex_unlock( &p_priv->var_lock );
+        msg_Err( p_this, "cannot add callback %p to nonexistent "
+                         "variable '%s'", pf_callback, psz_name );
         return VLC_ENOVAR;
     }
 



More information about the vlc-commits mailing list