mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 20:40:27 +00:00
testcard2: use rand() instead of rand_r()
rand_r was marked obsolete in POSIX 2008 and it is POSIX-only.
This commit is contained in:
@@ -310,13 +310,13 @@ void * vidcap_testcard2_thread(void *arg)
|
||||
s = (struct testcard_state2 *)arg;
|
||||
struct timeval curr_time;
|
||||
struct timeval next_frame_time;
|
||||
unsigned int seed = time(NULL);
|
||||
int prev_x1 = rand_r(&seed) % (s->tile->width - 300);
|
||||
int prev_y1 = rand_r(&seed) % (s->tile->height - 300);
|
||||
int down1 = rand_r(&seed) % 2, right1 = rand_r(&seed) % 2;
|
||||
int prev_x2 = rand_r(&seed) % (s->tile->width - 100);
|
||||
int prev_y2 = rand_r(&seed) % (s->tile->height - 100);
|
||||
int down2 = rand_r(&seed) % 2, right2 = rand_r(&seed) % 2;
|
||||
srand(time(NULL));
|
||||
int prev_x1 = rand() % (s->tile->width - 300);
|
||||
int prev_y1 = rand() % (s->tile->height - 300);
|
||||
int down1 = rand() % 2, right1 = rand() % 2;
|
||||
int prev_x2 = rand() % (s->tile->width - 100);
|
||||
int prev_y2 = rand() % (s->tile->height - 100);
|
||||
int down2 = rand() % 2, right2 = rand() % 2;
|
||||
|
||||
int stat_count_prev = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user