From c2947aee3ab83104926472e5370b8710e79523fa Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 26 Jun 2024 00:05:49 +0300 Subject: [PATCH] clock-malfunction-imitation.c: simplify randomization --- c-programming/experiments/clock-malfunction-imitation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-programming/experiments/clock-malfunction-imitation.c b/c-programming/experiments/clock-malfunction-imitation.c index e9cc0b3..1e9822b 100644 --- a/c-programming/experiments/clock-malfunction-imitation.c +++ b/c-programming/experiments/clock-malfunction-imitation.c @@ -50,7 +50,7 @@ time_t clock_change_time(time_t* x) { intmax_plus_1 = (size_t) INT_MAX + 1; for (size_t i = 0; i < max; i++) - y |= (rand() % intmax_plus_1) * intmax_plus_1; + y |= rand() % intmax_plus_1; } else ticks_before_accident--;