X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Factions%2Frate-policy.cpp;h=303b4a781765ab71f4a739073c0ac168b95b71c0;hb=f4d2c26adb8b6d18a62ca6d35e3a0529ff8a87b5;hp=25f8e4083387b11a53f0a74e92c4b6bcb4290306;hpb=64803277bbdbe0a943360d918298a48157d9da55;p=lttng-tools.git diff --git a/src/common/actions/rate-policy.cpp b/src/common/actions/rate-policy.cpp index 25f8e4083..303b4a781 100644 --- a/src/common/actions/rate-policy.cpp +++ b/src/common/actions/rate-policy.cpp @@ -48,6 +48,7 @@ struct lttng_rate_policy { rate_policy_mi_serialize_cb mi_serialize; }; +namespace { struct lttng_rate_policy_every_n { struct lttng_rate_policy parent; uint64_t interval; @@ -70,6 +71,7 @@ struct lttng_rate_policy_once_after_n_comm { struct lttng_rate_policy_every_n_comm { uint64_t interval; } LTTNG_PACKED; +} /* namespace */ /* Forward declaration. */ static void lttng_rate_policy_init(struct lttng_rate_policy *rate_policy, @@ -346,7 +348,7 @@ static struct lttng_rate_policy_every_n *rate_policy_every_n_from_rate_policy( { LTTNG_ASSERT(policy); - return container_of(policy, struct lttng_rate_policy_every_n, parent); + return lttng::utils::container_of(policy, <tng_rate_policy_every_n::parent); } static const struct lttng_rate_policy_every_n * @@ -355,7 +357,7 @@ rate_policy_every_n_from_rate_policy_const( { LTTNG_ASSERT(policy); - return container_of(policy, struct lttng_rate_policy_every_n, parent); + return lttng::utils::container_of(policy, <tng_rate_policy_every_n::parent); } static int lttng_rate_policy_every_n_serialize( @@ -558,8 +560,8 @@ rate_policy_once_after_n_from_rate_policy(struct lttng_rate_policy *policy) { LTTNG_ASSERT(policy); - return container_of( - policy, struct lttng_rate_policy_once_after_n, parent); + return lttng::utils::container_of( + policy, <tng_rate_policy_once_after_n::parent); } static const struct lttng_rate_policy_once_after_n * @@ -568,8 +570,8 @@ rate_policy_once_after_n_from_rate_policy_const( { LTTNG_ASSERT(policy); - return container_of( - policy, struct lttng_rate_policy_once_after_n, parent); + return lttng::utils::container_of( + policy, <tng_rate_policy_once_after_n::parent); } static int lttng_rate_policy_once_after_n_serialize( struct lttng_rate_policy *policy, struct lttng_payload *payload)