X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Flocation.cpp;h=b09430d617e408f76a88c041bc6fc1d5f96c8cf4;hb=3d667147a5af28441ad8c658ea1eac4ea8efd477;hp=80c4b4d554dff7fb1f354497040c2c20f40d1259;hpb=a6bc4ca9d659caf016ef932fcd944029737ac57c;p=lttng-tools.git diff --git a/src/common/location.cpp b/src/common/location.cpp index 80c4b4d55..b09430d61 100644 --- a/src/common/location.cpp +++ b/src/common/location.cpp @@ -5,10 +5,10 @@ * */ -#include -#include +#include +#include #include -#include +#include static struct lttng_trace_archive_location *lttng_trace_archive_location_create( @@ -16,7 +16,7 @@ struct lttng_trace_archive_location *lttng_trace_archive_location_create( { struct lttng_trace_archive_location *location; - location = (lttng_trace_archive_location *) zmalloc(sizeof(*location)); + location = zmalloc(); if (!location) { goto end; } @@ -31,7 +31,7 @@ static void trace_archive_location_destroy_ref(struct urcu_ref *ref) { struct lttng_trace_archive_location *location = - container_of(ref, struct lttng_trace_archive_location, ref); + lttng::utils::container_of(ref, <tng_trace_archive_location::ref); switch (location->type) { case LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_LOCAL: