[systemd-devel] [PATCH] Always use our own MAX/MIN definitions

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Apr 1 20:55:23 PDT 2013


On Mon, Apr 01, 2013 at 03:08:05AM -0300, Cristian Rodríguez wrote:
> code in src/shared/macro.h only defined MAX/MIN in case
> they were not defined previously. however the MAX/MIN
> macros implemented in glibc are not of the "safe" kind but defined
> as:
> 
> define MIN(a,b) (((a)<(b))?(a):(b))
> define MAX(a,b) (((a)>(b))?(a):(b))
> 
> Avoid nasty side effects by using our own versions instead.
> 
> Also fix the warnings derived from this change.
Committed.

Zbyszek


More information about the systemd-devel mailing list