[vlc-devel] [PATCH 2/7] input/item: simplify call to vlc_event_send
Filip Roséen
filip at atch.se
Tue Jan 10 13:52:35 CET 2017
There's no need for a temporary local variable and the do-while
wrapping to limit its scope, instead these changes uses a
compound-literal.
---
src/input/item.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/input/item.c b/src/input/item.c
index b6a8667ce6..4096893067 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1009,10 +1009,8 @@ void input_item_SetEpg( input_item_t *p_item, const vlc_epg_t *p_update, bool b_
free( psz_epg );
signal:
#endif
- do {
- vlc_event_t event = { .type = vlc_InputItemInfoChanged, };
- vlc_event_send( &p_item->event_manager, &event );
- } while(0);
+ vlc_event_send( &p_item->event_manager,
+ &(vlc_event_t){ .type = vlc_InputItemInfoChanged, } );
}
void input_item_ChangeEPGSource( input_item_t *p_item, int i_source_id )
--
2.11.0
More information about the vlc-devel
mailing list