Skip to content

Commit

Permalink
Merge pull request #11136 from donaldsharp/stupidity
Browse files Browse the repository at this point in the history
tests: Use XCALLOC instead of XMALLOC for threads
  • Loading branch information
ton31337 authored May 2, 2022
2 parents cd5b524 + b7597a8 commit 4f43a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/test_timer_correctness.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int main(int argc, char **argv)

prng = prng_new(0);

timers = XMALLOC(MTYPE_TMP, SCHEDULE_TIMERS * sizeof(*timers));
timers = XCALLOC(MTYPE_TMP, SCHEDULE_TIMERS * sizeof(*timers));

for (i = 0; i < SCHEDULE_TIMERS; i++) {
long interval_msec;
Expand Down Expand Up @@ -159,7 +159,7 @@ int main(int argc, char **argv)
* representing the expected "output" of the timers when they
* are run. */
j = 0;
alarms = XMALLOC(MTYPE_TMP, timers_pending * sizeof(*alarms));
alarms = XCALLOC(MTYPE_TMP, timers_pending * sizeof(*alarms));
for (i = 0; i < SCHEDULE_TIMERS; i++) {
if (!timers[i])
continue;
Expand Down

0 comments on commit 4f43a04

Please sign in to comment.