diff options
author | Thomas Gschwantner <tharre3@gmail.com> | 2019-09-28 18:59:31 +0200 |
---|---|---|
committer | Thomas Gschwantner <tharre3@gmail.com> | 2019-09-28 19:04:23 +0200 |
commit | 73ec28ebcaef074f51293e9e6c7088008025773c (patch) | |
tree | b2108e7ca96b4075b38f0f23606b8743a516c9a9 /random.h | |
parent | Fixup client, including a lot of refactoring (diff) | |
download | wg-dynamic-73ec28ebcaef074f51293e9e6c7088008025773c.tar.xz wg-dynamic-73ec28ebcaef074f51293e9e6c7088008025773c.zip |
Fix random_bounded() to always be in [0, bound)
Previously random_bounded(1) would return values in [0, 1], while values
> 1 would return [0, bound).
Diffstat (limited to '')
-rw-r--r-- | random.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8,6 +8,7 @@ #include <stdint.h> +uint64_t random_u64(); uint64_t random_bounded(uint64_t bound); #endif |