aboutsummaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-07-08 14:54:22 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-08 14:54:22 +1000
commit73b89cf2e1cd2b90b730fef0f878eb0dfee7e12d (patch)
tree8d9d3c891a2ed0aa3bb3fc8aef5d3f641aaaaa5f /libc
parentf74f1c83ef9165a9073ad33000ffe6576ee22c8f (diff)
downloadskiboot-73b89cf2e1cd2b90b730fef0f878eb0dfee7e12d.zip
skiboot-73b89cf2e1cd2b90b730fef0f878eb0dfee7e12d.tar.gz
skiboot-73b89cf2e1cd2b90b730fef0f878eb0dfee7e12d.tar.bz2
fix wrong operator use in stdlib/rand.c
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/rand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/rand.c b/libc/stdlib/rand.c
index 87e3efd..e11702a 100644
--- a/libc/stdlib/rand.c
+++ b/libc/stdlib/rand.c
@@ -20,5 +20,5 @@ rand(void)
{
_rand = _rand * 25364735 + 34563;
- return ((unsigned int) (_rand << 16) & RAND_MAX);
+ return ((unsigned int) (_rand >> 16) & RAND_MAX);
}