*
*/
-#include <assert.h>
#include <common/dynamic-array.h>
#include <common/error.h>
#include <common/macros.h>
static struct lttng_action_list *action_list_from_action(
const struct lttng_action *action)
{
- assert(action);
+ LTTNG_ASSERT(action);
return container_of(action, struct lttng_action_list, parent);
}
static const struct lttng_action_list *action_list_from_action_const(
const struct lttng_action *action)
{
- assert(action);
+ LTTNG_ASSERT(action);
return container_of(action, struct lttng_action_list, parent);
}
struct lttng_action_list *action_list;
bool valid;
- assert(IS_LIST_ACTION(action));
+ LTTNG_ASSERT(IS_LIST_ACTION(action));
action_list = action_list_from_action(action);
lttng_dynamic_pointer_array_get_pointer(
&action_list->actions, i);
- assert(child);
+ LTTNG_ASSERT(child);
if (!lttng_action_validate(child)) {
valid = false;
const struct lttng_action *child_b =
lttng_action_list_get_at_index(_b, i);
- assert(child_a);
- assert(child_b);
+ LTTNG_ASSERT(child_a);
+ LTTNG_ASSERT(child_b);
if (!lttng_action_is_equal(child_a, child_b)) {
goto end;
int ret;
unsigned int i, count;
- assert(action);
- assert(payload);
- assert(IS_LIST_ACTION(action));
+ LTTNG_ASSERT(action);
+ LTTNG_ASSERT(payload);
+ LTTNG_ASSERT(IS_LIST_ACTION(action));
action_list = action_list_from_action(action);
lttng_dynamic_pointer_array_get_pointer(
&action_list->actions, i);
- assert(child);
+ LTTNG_ASSERT(child);
ret = lttng_action_serialize(child, payload);
if (ret) {
return action_status;
}
-LTTNG_HIDDEN
enum lttng_error_code lttng_action_list_mi_serialize(
const struct lttng_trigger *trigger,
const struct lttng_action *action,
unsigned int i, count;
enum lttng_error_code ret_code;
- assert(action);
- assert(IS_LIST_ACTION(action));
- assert(writer);
+ LTTNG_ASSERT(action);
+ LTTNG_ASSERT(IS_LIST_ACTION(action));
+ LTTNG_ASSERT(writer);
/* Open action list. */
ret = mi_lttng_writer_open_element(
lttng_action_list_get_at_index(action, i);
const uint64_t index = (uint64_t) i;
- assert(child);
+ LTTNG_ASSERT(child);
/*
* Add the index to the action path.
return lttng_action_list_borrow_mutable_at_index(list, index);
}
-LTTNG_HIDDEN
struct lttng_action *lttng_action_list_borrow_mutable_at_index(
const struct lttng_action *list, unsigned int index)
{