Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 17.11.5
[deb_dpdk.git]
/
lib
/
librte_eal
/
common
/
include
/
rte_random.h
diff --git
a/lib/librte_eal/common/include/rte_random.h
b/lib/librte_eal/common/include/rte_random.h
index
aeff1f0
..
bfbfd13
100644
(file)
--- a/
lib/librte_eal/common/include/rte_random.h
+++ b/
lib/librte_eal/common/include/rte_random.h
@@
-60,7
+60,7
@@
extern "C" {
static inline void
rte_srand(uint64_t seedval)
{
static inline void
rte_srand(uint64_t seedval)
{
- srand48((long
unsigned int
)seedval);
+ srand48((long)seedval);
}
/**
}
/**
@@
-77,9
+77,9
@@
static inline uint64_t
rte_rand(void)
{
uint64_t val;
rte_rand(void)
{
uint64_t val;
- val = lrand48();
+ val =
(uint64_t)
lrand48();
val <<= 32;
val <<= 32;
- val += lrand48();
+ val +=
(uint64_t)
lrand48();
return val;
}
return val;
}