[vlc-devel] [PATCH] text/strings: vlc_xml_decode: use ARRAY_SIZE
Filip Roséen
filip at atch.se
Thu May 18 12:19:30 CEST 2017
---
src/text/strings.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/text/strings.c b/src/text/strings.c
index eb45145b31..ec68de3fc2 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -47,6 +47,7 @@
#include <vlc_strings.h>
#include <vlc_charset.h>
+#include <vlc_arrays.h>
#include <libvlc.h>
#include <errno.h>
@@ -254,7 +255,7 @@ void vlc_xml_decode( char *psz_value )
const struct xml_entity_s *ent;
ent = bsearch (psz_value + 1, xml_entities,
- sizeof (xml_entities) / sizeof (*ent),
+ ARRAY_SIZE (xml_entities),
sizeof (*ent), cmp_entity);
if (ent != NULL)
{
--
2.12.2
More information about the vlc-devel
mailing list