summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-01 09:43:37 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-01 09:43:37 +0000
commit94ecebc42368bd20dc671baaf397c136c530d09d (patch)
tree0ff49d2dab95a69bdcd8891be2df5caaab09018d /include
parent3b1b9d4638f0b92c161453f2896355183296803f (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/stdlib.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 9112a95c4..87b284639 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -347,9 +347,10 @@ struct random_data
int32_t *fptr; /* Front pointer. */
int32_t *rptr; /* Rear pointer. */
int32_t *state; /* Array of state values. */
- int rand_type; /* Type of random number generator. */
- int rand_deg; /* Degree of random number generator. */
- int rand_sep; /* Distance between front and rear. */
+ /* random_r.c, TYPE_x, DEG_x, SEP_x - small enough for int8_t */
+ int8_t rand_type; /* Type of random number generator. */
+ int8_t rand_deg; /* Degree of random number generator. */
+ int8_t rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};