[vlc-commits] msg: simplify msg_GenericVa() macro

Rémi Denis-Courmont git at videolan.org
Sun Feb 8 13:57:21 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb  8 14:08:57 2015 +0200| [d92c4331a6e6ce13780ddba2bd2742b71b8ffde3] | committer: Rémi Denis-Courmont

msg: simplify msg_GenericVa() macro

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

 include/vlc_messages.h                       |    3 ++-
 modules/codec/x264.c                         |    2 +-
 modules/demux/mkv/matroska_segment_parse.cpp |    2 +-
 modules/lua/vlc.h                            |    2 +-
 src/interface/dialog.c                       |    2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/vlc_messages.h b/include/vlc_messages.h
index b61f71d..045e9e8 100644
--- a/include/vlc_messages.h
+++ b/include/vlc_messages.h
@@ -66,7 +66,8 @@ VLC_API void vlc_Log(vlc_object_t *, int,
                      const char *, const char *, ...) VLC_FORMAT( 4, 5 );
 VLC_API void vlc_vaLog(vlc_object_t *, int,
                        const char *, const char *, va_list);
-#define msg_GenericVa(a, b, c, d, e) vlc_vaLog(VLC_OBJECT(a), b, c, d, e)
+#define msg_GenericVa(a, b, c, d) \
+    vlc_vaLog(VLC_OBJECT(a), b, MODULE_STRING, c, d)
 
 #define msg_Info( p_this, ... ) \
     vlc_Log( VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, __VA_ARGS__ )
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index 9ade897..7130296 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1471,7 +1471,7 @@ static void x264_log( void *data, int i_level, const char *psz, va_list args)
             i_level = VLC_MSG_DBG;
     }
 
-    msg_GenericVa( p_enc, i_level, MODULE_STRING, psz, args );
+    msg_GenericVa( p_enc, i_level, psz, args );
 };
 
 /****************************************************************************
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index d1943e5..d4a065c 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -191,7 +191,7 @@ static void MkvTree( demux_t & demuxer, int i_level, const char *psz_format, ...
     psz_foo2[ 4 * i_level ] = '+';
     psz_foo2[ 4 * i_level + 1 ] = ' ';
     strcpy( &psz_foo2[ 4 * i_level + 2 ], psz_format );
-    msg_GenericVa( &demuxer,VLC_MSG_DBG, "mkv", psz_foo2, args );
+    msg_GenericVa( &demuxer,VLC_MSG_DBG, psz_foo2, args );
     free( psz_foo2 );
     va_end( args );
 }
diff --git a/modules/lua/vlc.h b/modules/lua/vlc.h
index 85c7fc1..c6df44a 100644
--- a/modules/lua/vlc.h
+++ b/modules/lua/vlc.h
@@ -80,7 +80,7 @@ static inline void lua_Dbg( vlc_object_t * p_this, const char * ppz_fmt, ... )
 {
     va_list ap;
     va_start( ap, ppz_fmt );
-    msg_GenericVa( p_this, VLC_MSG_DBG, MODULE_STRING, ppz_fmt, ap );
+    msg_GenericVa( p_this, VLC_MSG_DBG, ppz_fmt, ap );
     va_end( ap );
 }
 
diff --git a/src/interface/dialog.c b/src/interface/dialog.c
index a1b8d3b..602db73 100644
--- a/src/interface/dialog.c
+++ b/src/interface/dialog.c
@@ -114,7 +114,7 @@ void dialog_VFatal (vlc_object_t *obj, bool modal, const char *title,
     if (provider == NULL)
     {
         msg_Err (obj, "%s", title);
-        msg_GenericVa (obj, VLC_MSG_ERR, MODULE_STRING, fmt, ap);
+        msg_GenericVa (obj, VLC_MSG_ERR, fmt, ap);
         return;
     }
 



More information about the vlc-commits mailing list