Skip to content
Browse files

random -> rand

  • Loading branch information...
1 parent 4ebf8c9 commit 331c39bb641afc970052dbc423370baf3c0a7645 @cloudwu committed Apr 11, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 testmap.c
View
6 testmap.c
@@ -12,13 +12,13 @@ test(struct map *m) {
int i;
int s = 0;
for (i=0;i<MAX*2;i++) {
- int inc = random() % 3 + 1;
+ int inc = rand() % 3 + 1;
s += inc;
a[i] = s;
}
for (i=0;i<MAX * 2;i++) {
- int x = random()%(MAX*2);
- int y = random()%(MAX*2);
+ int x = rand()%(MAX*2);
+ int y = rand()%(MAX*2);
int temp = a[x];
a[x] = a[y];
a[y] = temp;

0 comments on commit 331c39b

Please sign in to comment.
Something went wrong with that request. Please try again.