[FFmpeg-cvslog] avcodec/internal: Use do {} while() for ff_tlog()

Michael Niedermayer git at videolan.org
Sun Sep 20 13:06:21 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 20 12:55:10 2015 +0200| [b947ac9096e3eedd167a37c64509f0eba7a871e9] | committer: Michael Niedermayer

avcodec/internal: Use do {} while() for ff_tlog()

Avoids problems when used without braces

Found-by: Clément Bœsch <u at pkh.me>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b947ac9096e3eedd167a37c64509f0eba7a871e9
---

 libavcodec/internal.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index fbee411..52b8917 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -57,7 +57,7 @@
 #ifdef TRACE
 #   define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__)
 #else
-#   define ff_tlog(ctx, ...) while(0) {}
+#   define ff_tlog(ctx, ...) do {} while(0)
 #endif
 
 



More information about the ffmpeg-cvslog mailing list