[Asterisk-Dev] Re: asterisk/include/asterisk utils.h,1.46,1.47

Kevin P. Fleming kpfleming at digium.com
Sat Oct 29 07:03:36 MST 2005


Tony Mountifield wrote:

> This should be: res = (int)*input + value;
> 
> Without the cast, I believe the compiler is at liberty to evaluate the RHS
> in short precision (which might still overflow) and only extend on assigning
> the result to res.

Absolutely correct. Will fix in a jiffy.



More information about the asterisk-dev mailing list