[vlc-devel] [PATCH] demux/xiph_metadata: use ARRAY_SIZE
Filip Roséen
filip at atch.se
Wed Mar 15 10:07:39 CET 2017
increases readability.
---
modules/demux/xiph_metadata.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/xiph_metadata.c b/modules/demux/xiph_metadata.c
index 0123bae7af..a67b848474 100644
--- a/modules/demux/xiph_metadata.c
+++ b/modules/demux/xiph_metadata.c
@@ -31,6 +31,7 @@
#include <vlc_common.h>
#include <vlc_charset.h>
#include <vlc_strings.h>
+#include <vlc_arrays.h>
#include <vlc_input.h>
#include "xiph_metadata.h"
@@ -135,7 +136,7 @@ input_attachment_t* ParseFlacPicture( const uint8_t *p_data, size_t size,
p_attachment = vlc_input_attachment_New( name, mime, description, p_data,
size /* XXX: len instead? */ );
- if( type < sizeof(pi_cover_score)/sizeof(pi_cover_score[0]) &&
+ if( type < ARRAY_SIZE(pi_cover_score) &&
*i_cover_score < pi_cover_score[type] )
{
*i_cover_idx = i_attachments;
--
2.12.0
More information about the vlc-devel
mailing list