Nicolas George: > Michael Niedermayer (12021-02-19): >> Suggested-by: Andreas Rheinhardt >> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> >> --- >> doc/APIchanges | 3 +++ >> libavutil/common.h | 2 ++ >> 2 files changed, 5 insertions(+) > > Is it only for NULL+0 or is it for all NULL+x? > > It is ok to hide NULL+0, but NULL+x is a different kind of bug, more > serious, but the macro hides it. Maybe add an av_assert2()? > It is only for NULL+0; NULL+x is a real bug after all. And the macro doesn't hide it; NULL+x can still be detected with all the typical tools (ubsan) to detect NULL+x. Doing it this way has the advantage of allowing the compiler to optimize the branch away (GCC does it).
- Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".