From 94ecebc42368bd20dc671baaf397c136c530d09d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 1 Dec 2008 09:43:37 +0000 Subject: random: use smaller data fields where appropriate text data bss dec hex filename - 130 156 0 286 11e libc/stdlib/random.o + 130 148 0 278 116 libc/stdlib/random.o - 586 0 0 586 24a libc/stdlib/random_r.o + 570 0 0 570 23a libc/stdlib/random_r.o --- libc/stdlib/random_r.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libc/stdlib/random_r.c') diff --git a/libc/stdlib/random_r.c b/libc/stdlib/random_r.c index b6ff6afd2..cb70b7dc4 100644 --- a/libc/stdlib/random_r.c +++ b/libc/stdlib/random_r.c @@ -27,8 +27,7 @@ #include #include #include - - +#include /* An improved random number generation package. In addition to the standard rand()/srand() like interface, this package also has a special state info @@ -109,8 +108,8 @@ struct random_poly_info { - int seps[MAX_TYPES]; - int degrees[MAX_TYPES]; + smallint seps[MAX_TYPES]; + smallint degrees[MAX_TYPES]; }; static const struct random_poly_info random_poly_info = @@ -121,7 +120,6 @@ static const struct random_poly_info random_poly_info = - /* If we are using the trivial TYPE_0 R.N.G., just do the old linear congruential bit. Otherwise, we do our fancy trinomial stuff, which is the same in all the other cases due to all the global variables that have been -- cgit v1.2.3