Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/stdlib.c

    r9d58539 rff98ce8  
    3939long int random(void)
    4040{
    41         return glbl_seed = ((1366*glbl_seed + 150889) % RAND_MAX);
     41        return glbl_seed = ((1366 * glbl_seed + 150889) % RAND_MAX);
    4242}
    4343
    4444void srandom(unsigned int seed)
    4545{
    46         glbl_seed = seed;
     46        glbl_seed = seed % RAND_MAX;
    4747}
    4848
Note: See TracChangeset for help on using the changeset viewer.