[vlc-commits] demux/xiph_metadata: use ARRAY_SIZE
Filip Roséen
git at videolan.org
Wed Mar 15 19:19:24 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Mar 15 10:07:39 2017 +0100| [482ab047a11228ab9a09618ee6bf915631121766] | committer: Hugo Beauzée-Luyssen
demux/xiph_metadata: use ARRAY_SIZE
increases readability.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=482ab047a11228ab9a09618ee6bf915631121766
---
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 0123bae..a67b848 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;
More information about the vlc-commits
mailing list