On 03/14/2013 03:46:02 PM, Andre Renaud wrote:
There is a minor bug in the min/max macros that can result in
unexpected results when doing things like:
5 + min(a,b)
This currently essentially becomes
(5 + a) < (b) ? (a) : (b)
instead of:
5 + ((a < b) ? a : b)

Attached patch resolves it with the minimal changes
In general however, might not the following common min/max definitions
be more robust?

Actually removing them entirely would be more robust. It's not more efficient than open coding it, and doesn't really save any complexity at the call site.

Thanks,

Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to