[FFmpeg-devel] [PATCH 4/5] avformat/jpegxl_probe: inline various ret < 0 checks
Michael Niedermayer
michael at niedermayer.cc
Fri Jun 9 21:36:17 EEST 2023
On Thu, Jun 08, 2023 at 11:44:38PM -0300, James Almer wrote:
> On 6/8/2023 11:32 PM, Anton Khirnov wrote:
> > Quoting Leo Izen (2023-06-08 16:26:36)
> > > Inlines some ret < 0 checks to look like:
> > > if ((ret = func()) < 0)
> > > return ret;
> > >
> > > which clarifies code slightly.
> >
> > FWIW I find this variant less readable.
> > But it's your code, so up to you.
>
> Agree. It's both less readable
> and more prone to mistakes.
yes, we had bugs with people misplacing a () in exactly this
style of checking the return
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230609/a54b295b/attachment.sig>
More information about the ffmpeg-devel
mailing list