Skip to content

Commit

Permalink
tests: Use XCALLOC instead of XMALLOC for threads
Browse files Browse the repository at this point in the history
Someone decided to do malloc testing over make check.

Fixes: #11120
Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed May 2, 2022
1 parent de416e6 commit b7597a8
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 b7597a8

Please sign in to comment.