summaryrefslogtreecommitdiffstats
path: root/libsh/rand.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libsh/rand.sh')
-rw-r--r--libsh/rand.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/libsh/rand.sh b/libsh/rand.sh
index 07347d3..7efcc3b 100644
--- a/libsh/rand.sh
+++ b/libsh/rand.sh
@@ -22,25 +22,16 @@ static x=1
rand_x=1
-static srand()
+srand(int s)
{
- local s="${1}"
-
x=${s}
rand_x=${s}
}
-static rand()
+rand(void)
{
# Multiplier, increment, and modulus values are those used in glibc.
x=$((1103515245 * ${x} + 12345))
x=$((${x} % (${RAND_MAX} + 1)))
rand_x=${x}
}
-
-static rand_alias()
-{
- __alias ${srand} srand int
- __alias ${rand} rand
-}
-__init ${rand_alias}