changeset 9777:77fd9731dea5 libavcodec

Merge variable declaration and initialization.
author reimar
date Sun, 31 May 2009 11:35:20 +0000
parents 18d149e8fc7f
children d40725b7f6e0
files lcldec.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lcldec.c	Sun May 31 11:34:19 2009 +0000
+++ b/lcldec.c	Sun May 31 11:35:20 2009 +0000
@@ -83,7 +83,6 @@
     const unsigned char *srcptr_end = srcptr + srclen;
     unsigned mask = *srcptr++;
     unsigned maskbit = 0x80;
-    unsigned int ofs, cnt;
 
     while (srcptr < srcptr_end && destptr < destptr_end) {
         if (!(mask & maskbit)) {
@@ -91,8 +90,8 @@
             destptr += 4;
             srcptr += 4;
         } else {
-            ofs = bytestream_get_le16(&srcptr);
-            cnt = (ofs >> 11) + 1;
+            unsigned ofs = bytestream_get_le16(&srcptr);
+            unsigned cnt = (ofs >> 11) + 1;
             ofs &= 0x7ff;
             cnt *= 4;
             cnt = FFMIN(cnt, destptr_end - destptr);