[asterisk-dev] [asterisk-commits] file: trunk r89637 - /trunk/main/utils.c
Joshua Colp
jcolp at digium.com
Tue Nov 27 07:34:46 CST 2007
----- Original Message -----
From: Simon Perreault
[mailto:simon.perreault at viagenie.ca]
To: asterisk-dev at lists.digium.com
Sent:
Tue, 27 Nov 2007 13:06:36 -0400
Subject: Re: [asterisk-dev]
[asterisk-commits] file: trunk r89637 - /trunk/main/utils.c
> 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...
I tested both platforms before putting the change in and it worked fine on both, but it could be undefined. More exploring is required I suppose.
Joshua Colp
Software Developer
Digium, Inc.
More information about the asterisk-dev
mailing list