summaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/include/rte_random.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_eal/common/include/rte_random.h')
-rw-r--r--lib/librte_eal/common/include/rte_random.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/librte_eal/common/include/rte_random.h b/lib/librte_eal/common/include/rte_random.h
index 63bb2808..b2ca1c20 100644
--- a/lib/librte_eal/common/include/rte_random.h
+++ b/lib/librte_eal/common/include/rte_random.h
@@ -31,7 +31,7 @@ extern "C" {
static inline void
rte_srand(uint64_t seedval)
{
- srand48((long unsigned int)seedval);
+ srand48((long)seedval);
}
/**
@@ -48,9 +48,9 @@ static inline uint64_t
rte_rand(void)
{
uint64_t val;
- val = lrand48();
+ val = (uint64_t)lrand48();
val <<= 32;
- val += lrand48();
+ val += (uint64_t)lrand48();
return val;
}