diff mbox series

[FFmpeg-devel,2/2] avutil/film_grain_params: remove do loop in CHECK macro

Message ID 20240324001014.55461-3-leo.izen@gmail.com
State Accepted
Commit ac21582e5334388bc0ac47c273ac134023c64984
Headers show
Series Minor avutil/film_grain_params tweaks | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Leo Izen March 24, 2024, 12:10 a.m. UTC
The continue statement will break out of the do/while loop, not the
outer loop as intended. This is one (compound) statement anyway, so we
can remove the do/while entirely.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
---
 libavutil/film_grain_params.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavutil/film_grain_params.c b/libavutil/film_grain_params.c
index b3fa37f527..8f8dcee569 100644
--- a/libavutil/film_grain_params.c
+++ b/libavutil/film_grain_params.c
@@ -70,10 +70,8 @@  const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame)
             continue;
 
 #define CHECK(a, b, unspec)                                     \
-    do {                                                        \
         if ((a) != (unspec) && (b) != (unspec) && (a) != (b))   \
-            continue;                                           \
-    } while (0)
+            continue
 
         CHECK(fgp->bit_depth_luma,   bit_depth_luma,         0);
         CHECK(fgp->bit_depth_chroma, bit_depth_chroma,       0);