summaryrefslogtreecommitdiffstats
path: root/mbbsd/vice.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-04 01:41:26 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-02-04 01:41:26 +0800
commit920cb52f211a03479556866c712298141d368c50 (patch)
tree968cf0db6a62db237b6d928c42e40631a231b792 /mbbsd/vice.c
parent87fb00ac1f12f18d1176a4dc1988c8b86a7ef63c (diff)
downloadpttbbs-920cb52f211a03479556866c712298141d368c50.tar
pttbbs-920cb52f211a03479556866c712298141d368c50.tar.gz
pttbbs-920cb52f211a03479556866c712298141d368c50.tar.bz2
pttbbs-920cb52f211a03479556866c712298141d368c50.tar.lz
pttbbs-920cb52f211a03479556866c712298141d368c50.tar.xz
pttbbs-920cb52f211a03479556866c712298141d368c50.tar.zst
pttbbs-920cb52f211a03479556866c712298141d368c50.zip
replace rand() with random() for better randomness
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2460 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/vice.c')
-rw-r--r--mbbsd/vice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/vice.c b/mbbsd/vice.c
index 843d3e83..ef527b72 100644
--- a/mbbsd/vice.c
+++ b/mbbsd/vice.c
@@ -54,7 +54,7 @@ ran_showfile(int y, int x, char *filename, int maxnum)
char buf[512];
bzero(buf, sizeof(buf));
- snprintf(buf, sizeof(buf), "%s%d", filename, rand() % maxnum + 1);
+ snprintf(buf, sizeof(buf), "%s%d", filename, random() % maxnum + 1);
if (!(fs = fopen(buf, "r"))) {
move(10, 10);
prints("can't open file: %s", buf);
@@ -74,7 +74,7 @@ ran_showmfile(char *filename, int maxnum)
{
char buf[256];
- snprintf(buf, sizeof(buf), "%s%d", filename, rand() % maxnum + 1);
+ snprintf(buf, sizeof(buf), "%s%d", filename, random() % maxnum + 1);
return more(buf, YEA);
}