Reverted the recent change from random_rand() to rand(). It turned out that

since libc rand() returns a signed int, there were frequently problems with
timer values wrapping. By reverting to random_rand(), we can provide a
random generator that returns an unsigned and the timer problems are solved.
This commit is contained in:
adamdunkels 2009-02-11 11:08:53 +00:00
parent b80d3cfdb9
commit 585620c102
10 changed files with 28 additions and 29 deletions

View file

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: netflood.c,v 1.1 2008/07/03 22:25:22 adamdunkels Exp $
* $Id: netflood.c,v 1.2 2009/02/11 11:08:56 adamdunkels Exp $
*/
/**
@ -44,7 +44,7 @@
*/
#include "net/rime/netflood.h"
#include "lib/rand.h"
#include <string.h>
#define HOPS_MAX 16