projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warning.
[pintos-anon]
/
src
/
lib
/
random.c
diff --git
a/src/lib/random.c
b/src/lib/random.c
index 63d798d6bf6394dcb017f096c5980cf4722c4fb9..c22414e9b779cd79123fe4390d3d0945b2d02d6c 100644
(file)
--- a/
src/lib/random.c
+++ b/
src/lib/random.c
@@
-73,7
+73,9
@@
random_bytes (void *buf_, size_t size)
}
}
}
}
-/* Returns a pseudo-random unsigned long. */
+/* Returns a pseudo-random unsigned long.
+ Use random_ulong() % n to obtain a random number in the range
+ 0...n (exclusive). */
unsigned long
random_ulong (void)
{
unsigned long
random_ulong (void)
{