diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c index cb1e75fe57173b789009c08ad8de036fd64c8bb2..02413a636ca70f8ee624a365e2b8119301b19f38 100644 --- a/modules/control/dbus/dbus_player.c +++ b/modules/control/dbus/dbus_player.c @@ -555,9 +555,9 @@ DBUS_SIGNAL( SeekedSignal ) SIGNAL_SEND; } -#define PROPERTY_MAPPING_BEGIN if( 0 ) {} +#define PROPERTY_MAPPING_BEGIN #define PROPERTY_GET_FUNC( prop, signature ) \ - else if( !strcmp( psz_property_name, #prop ) ) { \ + if( !strcmp( psz_property_name, #prop ) ) { \ if( !dbus_message_iter_open_container( &args, DBUS_TYPE_VARIANT, signature, &v ) ) \ return DBUS_HANDLER_RESULT_NEED_MEMORY; \ if( VLC_SUCCESS != Marshal##prop( p_this, &v ) ) { \ @@ -566,12 +566,12 @@ DBUS_SIGNAL( SeekedSignal ) } \ if( !dbus_message_iter_close_container( &args, &v ) ) \ return DBUS_HANDLER_RESULT_NEED_MEMORY; \ - } + } else #define PROPERTY_SET_FUNC( prop ) \ - else if( !strcmp( psz_property_name, #prop ) ) { \ + if( !strcmp( psz_property_name, #prop ) ) \ return prop##Set( p_conn, p_from, p_this ); \ - } -#define PROPERTY_MAPPING_END else { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } + else +#define PROPERTY_MAPPING_END return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; DBUS_METHOD( GetProperty ) { diff --git a/modules/control/dbus/dbus_root.c b/modules/control/dbus/dbus_root.c index c332883730de2f82710da04375466497ab433c06..d663bc18cfd839ed24880e16658c023648c2fa68 100644 --- a/modules/control/dbus/dbus_root.c +++ b/modules/control/dbus/dbus_root.c @@ -272,9 +272,9 @@ DBUS_METHOD( Raise ) REPLY_SEND; } -#define PROPERTY_MAPPING_BEGIN if( 0 ) {} +#define PROPERTY_MAPPING_BEGIN #define PROPERTY_GET_FUNC( prop, signature ) \ - else if( !strcmp( psz_property_name, #prop ) ) { \ + if( !strcmp( psz_property_name, #prop ) ) { \ if( !dbus_message_iter_open_container( &args, DBUS_TYPE_VARIANT, signature, &v ) ) \ return DBUS_HANDLER_RESULT_NEED_MEMORY; \ if( VLC_SUCCESS != Marshal##prop( p_this, &v ) ) { \ @@ -283,12 +283,12 @@ DBUS_METHOD( Raise ) } \ if( !dbus_message_iter_close_container( &args, &v ) ) \ return DBUS_HANDLER_RESULT_NEED_MEMORY; \ - } + } else #define PROPERTY_SET_FUNC( prop ) \ - else if( !strcmp( psz_property_name, #prop ) ) { \ + if( !strcmp( psz_property_name, #prop ) ) \ return prop##Set( p_conn, p_from, p_this ); \ - } -#define PROPERTY_MAPPING_END else { return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } + else +#define PROPERTY_MAPPING_END return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; DBUS_METHOD( GetProperty ) {