diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-06-20 01:26:19 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-05-30 02:24:55 +0200 |
commit | b06fd12526849dd65836a1899a4cabca4525a96d (patch) | |
tree | 6f119eca0a370de7b38255c61b67b9765131e9b9 /ripd | |
parent | lib: include thread information in backtraces (diff) | |
download | frr-b06fd12526849dd65836a1899a4cabca4525a96d.tar.xz frr-b06fd12526849dd65836a1899a4cabca4525a96d.zip |
Quagga: Fix code to use srandom/random
Quagga was using a mix of srand/rand and srandom/random.
Consolidate to use srandom/random which are the POSIX
versions of random number generators
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ripd')
-rw-r--r-- | ripd/ripd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index fc3ad3adb..42f101545 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -2867,7 +2867,7 @@ rip_update_jitter (unsigned long time) if (jitter_input < JITTER_BOUND) jitter_input = JITTER_BOUND; - jitter = (((rand () % ((jitter_input * 2) + 1)) - jitter_input)); + jitter = (((random () % ((jitter_input * 2) + 1)) - jitter_input)); return jitter/JITTER_BOUND; } @@ -4140,7 +4140,7 @@ void rip_init (void) { /* Randomize for triggered update random(). */ - srand (time (NULL)); + srandom (time (NULL)); /* Install top nodes. */ install_node (&rip_node, config_write_rip); |