relayd: viewer_stream: use lttng::utils::container_of
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 22 Jul 2024 19:08:47 +0000 (19:08 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Jul 2024 01:26:51 +0000 (01:26 +0000)
caa_container_of makes use of offsetof which is conditionally
supported for non-POD types. Replace its use by
lttng::utils::container_of.

Change-Id: Ied676a7003749a82b0ae4eeb8a1bcedb0e081673
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-relayd/viewer-stream.cpp

index 6ea7d88982571f053e804be3cd03d07701102edc..e3061ec874e4337ecc4420ec73283efefd71bce5 100644 (file)
@@ -235,8 +235,7 @@ static void viewer_stream_unpublish(struct relay_viewer_stream *vstream)
 
 static void viewer_stream_release(struct urcu_ref *ref)
 {
-       struct relay_viewer_stream *vstream =
-               caa_container_of(ref, struct relay_viewer_stream, ref);
+       auto *vstream = lttng::utils::container_of(ref, &relay_viewer_stream::ref);
 
        if (vstream->stream->is_metadata) {
                rcu_assign_pointer(vstream->stream->trace->viewer_metadata_stream, NULL);
This page took 0.026267 seconds and 4 git commands to generate.