projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: replace container_of with a C++ safe implementation
[lttng-tools.git]
/
src
/
common
/
location.cpp
diff --git
a/src/common/location.cpp
b/src/common/location.cpp
index 7e6ea79b0aac8baa6082ff5f06869e7771bac670..b09430d617e408f76a88c041bc6fc1d5f96c8cf4 100644
(file)
--- a/
src/common/location.cpp
+++ b/
src/common/location.cpp
@@
-16,7
+16,7
@@
struct lttng_trace_archive_location *lttng_trace_archive_location_create(
{
struct lttng_trace_archive_location *location;
{
struct lttng_trace_archive_location *location;
- location =
(lttng_trace_archive_location *) zmalloc(sizeof(*location)
);
+ location =
zmalloc<lttng_trace_archive_location>(
);
if (!location) {
goto end;
}
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 =
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:
switch (location->type) {
case LTTNG_TRACE_ARCHIVE_LOCATION_TYPE_LOCAL:
This page took
0.025472 seconds
and
4
git commands to generate.