Changeset 2b3dd78 in mainline for uspace/lib/c/generic/stdlib.c
- Timestamp:
- 2018-01-31T12:02:00Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5595841
- Parents:
- a0a9cc2 (diff), 14d789c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stdlib.c
ra0a9cc2 r2b3dd78 35 35 #include <stdlib.h> 36 36 37 static longglbl_seed = 1;37 static int glbl_seed = 1; 38 38 39 long int random(void)39 int rand(void) 40 40 { 41 41 return glbl_seed = ((1366 * glbl_seed + 150889) % RAND_MAX); 42 42 } 43 43 44 void srand om(unsigned int seed)44 void srand(unsigned int seed) 45 45 { 46 46 glbl_seed = seed % RAND_MAX;
Note:
See TracChangeset
for help on using the changeset viewer.