[vlc-commits] text/strings: vlc_xml_decode: use ARRAY_SIZE
Filip Roséen
git at videolan.org
Thu May 18 21:08:38 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:19:30 2017 +0200| [3fb5f7ce6f00b65198b5044571f73fedd9605612] | committer: Jean-Baptiste Kempf
text/strings: vlc_xml_decode: use ARRAY_SIZE
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3fb5f7ce6f00b65198b5044571f73fedd9605612
---
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)
{
More information about the vlc-commits
mailing list