X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Frotate.cpp;fp=src%2Flib%2Flttng-ctl%2Frotate.cpp;h=106b8fb489947be591f31e6e44ab863f815ee9d3;hp=b6a66392af2cd2e492d7f7eec0af567ed8d71f0d;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/lib/lttng-ctl/rotate.cpp b/src/lib/lttng-ctl/rotate.cpp index b6a66392a..106b8fb48 100644 --- a/src/lib/lttng-ctl/rotate.cpp +++ b/src/lib/lttng-ctl/rotate.cpp @@ -230,7 +230,7 @@ int lttng_rotate_session(const char *session_name, goto end; } - *rotation_handle = (lttng_rotation_handle *) zmalloc(sizeof(struct lttng_rotation_handle)); + *rotation_handle = zmalloc(); if (!*rotation_handle) { ret = -LTTNG_ERR_NOMEM; goto end; @@ -350,7 +350,7 @@ end: static struct lttng_rotation_schedules *lttng_rotation_schedules_create(void) { - return (lttng_rotation_schedules *) zmalloc(sizeof(struct lttng_rotation_schedules)); + return zmalloc(); } static @@ -463,7 +463,7 @@ lttng_rotation_schedule_size_threshold_create(void) { struct lttng_rotation_schedule_size_threshold *schedule; - schedule = (lttng_rotation_schedule_size_threshold *) zmalloc(sizeof(*schedule)); + schedule = zmalloc(); if (!schedule) { goto end; } @@ -529,7 +529,7 @@ lttng_rotation_schedule_periodic_create(void) { struct lttng_rotation_schedule_periodic *schedule; - schedule = (lttng_rotation_schedule_periodic *) zmalloc(sizeof(*schedule)); + schedule = zmalloc(); if (!schedule) { goto end; }