diff mbox series

[FFmpeg-devel,2/4] avcodec/mjpegdec: Remove redundant initialization

Message ID 20201008191842.385813-2-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/4] avcodec/mjpegdec: Remove use_static from build_vlc() | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 8, 2020, 7:18 p.m. UTC
Now that the correct number of codes is used, it is no longer necessary
to initialize the lengths of the codes at all any more as the length of
the actually used codes is set later anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/mjpegdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 8, 2020, 8:04 p.m. UTC | #1
On Thu, Oct 08, 2020 at 09:18:40PM +0200, Andreas Rheinhardt wrote:
> Now that the correct number of codes is used, it is no longer necessary
> to initialize the lengths of the codes at all any more as the length of
> the actually used codes is set later anyway.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/mjpegdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

lgtm
diff mbox series

Patch

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a56afc0fb7..147dd819e5 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -69,7 +69,7 @@  static int build_vlc(VLC *vlc, const uint8_t *bits_table,
                      const uint8_t *val_table, int nb_codes,
                      int is_ac)
 {
-    uint8_t huff_size[256] = { 0 };
+    uint8_t huff_size[256];
     uint16_t huff_code[256];
     uint16_t huff_sym[256];
     int i;