[asterisk-dev] [asterisk-commits] file: trunk r89637 - /trunk/main/utils.c

Simon Perreault simon.perreault at viagenie.ca
Tue Nov 27 11:06:36 CST 2007


On Tuesday 27 November 2007 12:01:19 SVN commits to the Asterisk project 
wrote:
> +			long int rm = RAND_MAX;
>  			res = res < 0 ? ~res : res;
> -			return res;
> +			rm++;
> +			return res % rm;

Hum... Won't rm be zero on 32-bit platforms? Modulo zero isn't defined in C...



More information about the asterisk-dev mailing list