]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: random() returns long
authorDavid Lamparter <equinox@opensourcerouting.org>
Sun, 19 Apr 2015 12:40:02 +0000 (14:40 +0200)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 15:33:29 +0000 (15:33 +0000)
commit37e20390bdb76366b698665637438d163223937b
tree000f8b3d9cb7d62c43640d817619db3b7e50d2f7
parentec5044feb90b735b814aa4201538423a22869109
bgpd: random() returns long

bgpd was using unsigned to store a probability value to be used with
random().  That, however, returns long, running into some warnings (and
worst case, if RAND_MAX > UINT_MAX, won't work correctly.

Just use long to shuffle the value around.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 8c9cd85631b77fac0bc30ffb9f23b29c466d31c4)
bgpd/bgp_routemap.c