X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-ust.cpp;h=de368a3baa054a25616f342017b0d1fdc3ecf1f4;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=285ff0811f3a9f5be3573cad48893d9985ad244d;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-ust.cpp b/src/bin/lttng-sessiond/trace-ust.cpp index 285ff0811..de368a3ba 100644 --- a/src/bin/lttng-sessiond/trace-ust.cpp +++ b/src/bin/lttng-sessiond/trace-ust.cpp @@ -271,7 +271,7 @@ struct ltt_ust_session *trace_ust_create_session(uint64_t session_id) struct ltt_ust_session *lus; /* Allocate a new ltt ust session */ - lus = (ltt_ust_session *) zmalloc(sizeof(struct ltt_ust_session)); + lus = zmalloc(); if (lus == NULL) { PERROR("create ust session zmalloc"); goto error_alloc; @@ -350,7 +350,7 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan, LTTNG_ASSERT(chan); - luc = (ltt_ust_channel *) zmalloc(sizeof(struct ltt_ust_channel)); + luc = zmalloc(); if (luc == NULL) { PERROR("ltt_ust_channel zmalloc"); goto error; @@ -463,7 +463,7 @@ enum lttng_error_code trace_ust_create_event(struct lttng_event *ev, goto error; } - local_ust_event = (ltt_ust_event *) zmalloc(sizeof(struct ltt_ust_event)); + local_ust_event = zmalloc(); if (local_ust_event == NULL) { PERROR("ust event zmalloc"); ret = LTTNG_ERR_NOMEM; @@ -687,7 +687,7 @@ struct ltt_ust_context *trace_ust_create_context( goto end; } - uctx = (ltt_ust_context *) zmalloc(sizeof(struct ltt_ust_context)); + uctx = zmalloc(); if (!uctx) { PERROR("zmalloc ltt_ust_context"); goto end; @@ -813,7 +813,7 @@ static int id_tracker_add_id(struct ust_id_tracker *id_tracker, int id) retval = LTTNG_ERR_PROCESS_ATTR_EXISTS; goto end; } - tracker_node = (ust_id_tracker_node *) zmalloc(sizeof(*tracker_node)); + tracker_node = zmalloc(); if (!tracker_node) { retval = LTTNG_ERR_NOMEM; goto end;