]> git.sesse.net Git - ffmpeg/commit
avcodec/smacker: Use same variable for return values and errors
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 25 Jul 2020 11:29:52 +0000 (13:29 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 17 Sep 2020 23:44:09 +0000 (01:44 +0200)
commite028e8aa39a430568b486751cf82b3a26e24e7af
treeea505e9406d1e249a7441291121c8bc7340ef7f0
parent4656c1771b4ac12d9df9812390551f32fda181bc
avcodec/smacker: Use same variable for return values and errors

smacker_decode_header_tree() uses different variables for return values
(res) and for errors (err) leading to code like
res = foo(bar);
if (res < 0) {
    err = res;
    goto error;
}
Given that no positive return value is ever used at all one can simplify
the above by removing the intermediate res.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/smacker.c