[FFmpeg-devel] [PATCH 4/5] avformat/jpegxl_probe: inline various ret < 0 checks

2023-06-08 Thread Leo Izen
Inlines some ret < 0 checks to look like: if ((ret = func()) < 0) return ret; which clarifies code slightly. Signed-off-by: Leo Izen --- libavformat/jpegxl_probe.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavformat/jpegxl_probe.c b/libavformat/j

Re: [FFmpeg-devel] [PATCH 4/5] avformat/jpegxl_probe: inline various ret < 0 checks

2023-06-08 Thread Anton Khirnov
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. -- Anton Khirnov __

Re: [FFmpeg-devel] [PATCH 4/5] avformat/jpegxl_probe: inline various ret < 0 checks

2023-06-08 Thread James Almer
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

Re: [FFmpeg-devel] [PATCH 4/5] avformat/jpegxl_probe: inline various ret < 0 checks

2023-06-09 Thread Michael Niedermayer
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 slight