Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

random -> rand

  • Loading branch information...
commit 331c39bb641afc970052dbc423370baf3c0a7645 1 parent 4ebf8c9
云风 authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 testmap.c
6 testmap.c
@@ -12,13 +12,13 @@ test(struct map *m) {
12 12 int i;
13 13 int s = 0;
14 14 for (i=0;i<MAX*2;i++) {
15   - int inc = random() % 3 + 1;
  15 + int inc = rand() % 3 + 1;
16 16 s += inc;
17 17 a[i] = s;
18 18 }
19 19 for (i=0;i<MAX * 2;i++) {
20   - int x = random()%(MAX*2);
21   - int y = random()%(MAX*2);
  20 + int x = rand()%(MAX*2);
  21 + int y = rand()%(MAX*2);
22 22 int temp = a[x];
23 23 a[x] = a[y];
24 24 a[y] = temp;

0 comments on commit 331c39b

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