[vlc-devel] commit: Macro protection. ( Rémi Duraffort )

git version control git at videolan.org
Wed Oct 1 20:52:15 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Oct  1 20:50:04 2008 +0200| [6f7a1d4d1a864429239933972b6edab34c298723] | committer: Rémi Duraffort 

Macro protection.

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

 src/control/mediacontrol_internal.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/control/mediacontrol_internal.h b/src/control/mediacontrol_internal.h
index 6ca9a43..3e741ea 100644
--- a/src/control/mediacontrol_internal.h
+++ b/src/control/mediacontrol_internal.h
@@ -57,8 +57,8 @@ mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long,
 #define RAISE( c, m )  if( exception ) { exception->code = c;    \
                                          exception->message = strdup(m); }
 
-#define RAISE_NULL( c, m ) { RAISE( c, m ); return NULL; }
-#define RAISE_VOID( c, m ) { RAISE( c, m ); return; }
+#define RAISE_NULL( c, m ) do{ RAISE( c, m ); return NULL; } while(0)
+#define RAISE_VOID( c, m ) do{ RAISE( c, m ); return;      } while(0)
 
 #define HANDLE_LIBVLC_EXCEPTION_VOID( e )  if( libvlc_exception_raised( e ) ) {    \
     RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \




More information about the vlc-devel mailing list