[FFmpeg-devel] [PATCH] avutil/common: Add FFNABS()

Michael Niedermayer michaelni at gmx.at
Thu Sep 3 08:53:01 CEST 2015

On Wed, Sep 02, 2015 at 05:33:04PM -0700, Ganesh Ajjanagadde wrote:
> On Wed, Sep 2, 2015 at 5:17 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > From: Michael Niedermayer <michael at niedermayer.cc>
> >
> > This function avoids the undefined corner cases which affects other absolute
> > value functions and macros
> LGTM, except for the comment/commit message. This does not avoid all
> weird cases, see e.g

> https://stackoverflow.com/questions/202537/c-macro-question-x-vs-x
> but only the reasonable ones, roughly speaking where one does not do
> arithmetic expression inside the macro.

> Somewhere a note should ideally be made regarding this.


> Furthermore, the commit message ideally should say that this a macro,
> not a function to guard people against such abuse of it.




Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150903/cfc7f9da/attachment.sig>

More information about the ffmpeg-devel mailing list