aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2015-03-22 15:27:39 +0000
committerTomasz Kramkowski <tk@the-tk.com>2015-03-22 15:27:39 +0000
commit6a3895598cae5476f386f9f6976fc0475cecfafc (patch)
tree6b3cb3642fa42797620708de24eaa38f0901649d
parent9c9a39f34a3cc66689796b11242e9fb537d4b6c7 (diff)
downloadc-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.tar.gz
c-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.tar.xz
c-stuff-6a3895598cae5476f386f9f6976fc0475cecfafc.zip
randtest.c no longer does something idiotic.
-rw-r--r--randtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/randtest.c b/randtest.c
index 544fc88..710377f 100644
--- a/randtest.c
+++ b/randtest.c
@@ -27,7 +27,7 @@ static unsigned rand_to_max(unsigned max)
while ((random = rand()) == (double)RAND_MAX);
- return random / (double)RAND_MAX * (double)(max + 1);
+ return random / (double)RAND_MAX * (double)max;
}
int main(int argc, char **argv)