changeset 581:95c9067ebb73 libavutil

uses FF_ARRAY_ELEMS() where appropriate
author aurel
date Tue, 21 Oct 2008 21:40:24 +0000
parents fddfdadb477f
children 57da90f7c680
files base64.c crc.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/base64.c	Tue Oct 21 14:57:55 2008 +0000
+++ b/base64.c	Tue Oct 21 21:40:24 2008 +0000
@@ -51,7 +51,7 @@
     v = 0;
     for (i = 0; in[i] && in[i] != '='; i++) {
         unsigned int index= in[i]-43;
-        if (index>=(sizeof(map2)/sizeof(map2[0])) || map2[index] == 0xff)
+        if (index>=FF_ARRAY_ELEMS(map2) || map2[index] == 0xff)
             return -1;
         v = (v << 6) + map2[index];
         if (i & 3) {
--- a/crc.c	Tue Oct 21 14:57:55 2008 +0000
+++ b/crc.c	Tue Oct 21 21:40:24 2008 +0000
@@ -91,7 +91,7 @@
  */
 const AVCRC *av_crc_get_table(AVCRCId crc_id){
 #ifndef CONFIG_HARDCODED_TABLES
-    if (!av_crc_table[crc_id][sizeof(av_crc_table[crc_id])/sizeof(av_crc_table[crc_id][0])-1])
+    if (!av_crc_table[crc_id][FF_ARRAY_ELEMS(av_crc_table[crc_id])-1])
         if (av_crc_init(av_crc_table[crc_id],
                         av_crc_table_params[crc_id].le,
                         av_crc_table_params[crc_id].bits,