[MPlayer-dev-eng] [PATCH] Re: min() and max() macro definitions

Ville Saari 114263 at vs.iki.fi
Sun Mar 20 03:11:28 CET 2005


On Sat, Mar 19, 2005 at 08:05:49AM +0000, adland wrote:

> just a note that MIN1(a,b) (((a)<(b))?(a):(b))
>              and MIN2(a,b) ((a) <= (b) ? (a) : (b))
> 
> are equivalent macros because if a==b then either value is minimal 
> with MIN1 we would return b and MIN2 returns a  - the values are same.
> simmilar with MAX

Not completely equivalent. The value is same, but the possible
side effects from evaluating a and b are not.

-- 
 Ville




More information about the MPlayer-dev-eng mailing list