projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: use prandom_u32_max() when possible, part 1
[linux-2.6-block.git]
/
net
/
ceph
/
mon_client.c
diff --git
a/net/ceph/mon_client.c
b/net/ceph/mon_client.c
index 6a6898ee40495d9de053396ae29cf482c0a62c66..db60217f911b31ca04a768b3dee562d1d165ca02 100644
(file)
--- a/
net/ceph/mon_client.c
+++ b/
net/ceph/mon_client.c
@@
-222,7
+222,7
@@
static void pick_new_mon(struct ceph_mon_client *monc)
max--;
}
- n = prandom_u32
() % max
;
+ n = prandom_u32
_max(max)
;
if (o >= 0 && n >= o)
n++;