session rotation condition and evaluation objects' base
class is initialized from a template to set the various
method's function pointers to the functions implementing
their interface.
The memcpy() erroneously uses the "derived" class' size through
sizeof(*obj) rather than the size of the base class through
sizeof(obj->parent).
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
memcpy(&condition->parent, &rotation_condition_template,
- sizeof(*condition));
+ sizeof(condition->parent));
lttng_condition_init(&condition->parent, type);
return &condition->parent;
}
}
memcpy(&evaluation->parent, &rotation_evaluation_template,
- sizeof(*evaluation));
+ sizeof(evaluation->parent));
lttng_evaluation_init(&evaluation->parent, type);
evaluation->id = id;
evaluation->location = location;