X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.cpp;fp=tests%2Funit%2Ftest_ust_data.cpp;h=35d0c82eb2979724d26e1b54efd0e849c54186b1;hp=9cfdac4f31c08473d82ae10ad206dc2c28577191;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/tests/unit/test_ust_data.cpp b/tests/unit/test_ust_data.cpp index 9cfdac4f3..35d0c82eb 100644 --- a/tests/unit/test_ust_data.cpp +++ b/tests/unit/test_ust_data.cpp @@ -165,7 +165,7 @@ static void test_create_ust_event_exclusion(void) ev.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL; /* set up an exclusion set */ - exclusion = (lttng_event_exclusion *) zmalloc(sizeof(*exclusion) + + exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN * exclusion_count); ok(exclusion != NULL, "Create UST exclusion"); if (!exclusion) { @@ -185,7 +185,7 @@ static void test_create_ust_event_exclusion(void) ok(ret != LTTNG_OK, "Create UST event with identical exclusion names fails"); - exclusion = (lttng_event_exclusion *) zmalloc(sizeof(*exclusion) + + exclusion = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN * exclusion_count); ok(exclusion != NULL, "Create UST exclusion"); if (!exclusion) { @@ -193,7 +193,7 @@ static void test_create_ust_event_exclusion(void) goto end; } - exclusion_copy = (lttng_event_exclusion *) zmalloc(sizeof(*exclusion) + + exclusion_copy = zmalloc(sizeof(*exclusion) + LTTNG_SYMBOL_NAME_LEN * exclusion_count); if (!exclusion_copy) { skip(2, "zmalloc failed");