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 f337db64af ("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>
This commit is contained in:
Sven Eckelmann 2020-04-13 21:23:29 +02:00 • committed by Simon Wunderlich
commit 26893e7e92
3 changed files with 5 additions and 5 deletions