commit | 26893e7e928e1790852b072edb9bff3c1309e111 | [log] [tgz] |
---|---|---|
author | Sven Eckelmann <sven@narfation.org> | Mon Apr 13 21:23:29 2020 +0200 |
committer | Simon Wunderlich <sw@simonwunderlich.de> | Tue Apr 21 10:07:31 2020 +0200 |
tree | d52f2653a1ea2c3ae24f44106156630c4db7263c | |
parent | 9204a4f876b229505f4ab947124d1160b80bbb4c [diff] |
batman-adv: Utilize prandom_u32_max for random [0, max) values The kernel provides a function to create random values from 0 - (max-1) since commit f337db64af05 ("random32: add prandom_u32_max and convert open coded users"). Simply use this function to replace code sections which use prandom_u32 and a handcrafted method to map it to the correct range. Signed-off-by: Sven Eckelmann <sven@narfation.org>