[FFmpeg-devel] [PATCH 7/8] avcodec/smacker: Use same variable for return values and errors

Paul B Mahol onemda at gmail.com
Wed Aug 19 22:21:20 EEST 2020


On 7/31/20, Andreas Rheinhardt <andreas.rheinhardt at gmail.com> wrote:
> 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.
>

LGTM


More information about the ffmpeg-devel mailing list