Ignore:
Timestamp:
2018-01-15T21:40:49Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dbbbe75b
Parents:
ba29018
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:20:07)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:40:49)
Message:

Use standard names for rand() and srand().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/dist/src/c/demos/tetris/tetris.c

    rba29018 rc718bda  
    157157const struct shape *randshape(void)
    158158{
    159         const struct shape *tmp = &shapes[random() % 7];
     159        const struct shape *tmp = &shapes[rand() % 7];
    160160        int i;
    161         int j = random() % 4;
     161        int j = rand() % 4;
    162162       
    163163        for (i = 0; i < j; i++)
     
    172172       
    173173        gettimeofday(&tv, NULL);
    174         srandom(tv.tv_sec + tv.tv_usec / 100000);
     174        srand(tv.tv_sec + tv.tv_usec / 100000);
    175175}
    176176
Note: See TracChangeset for help on using the changeset viewer.