]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Use XCALLOC instead of XMALLOC for threads 11136/head
authorDonald Sharp <sharpd@nvidia.com>
Mon, 2 May 2022 17:00:47 +0000 (13:00 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 2 May 2022 17:00:47 +0000 (13:00 -0400)
Someone decided to do malloc testing over make check.

Fixes: #11120
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/lib/test_timer_correctness.c

index 4172ca3001d7d12a4aca51223c15968904c3add6..475fabd2d719e80a87c063f3b98ecbdba4378ab7 100644 (file)
@@ -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;
@@ -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;