memcpy(&event_param, &sw->event_param,
sizeof(event_param));
- memcpy(event_param.name,
+ strncpy(event_param.name,
desc->name,
sizeof(event_param.name));
+ event_param.name[sizeof(event_param.name) - 1] = '\0';
/* create event */
ret = ltt_event_create(sw->chan,
&event_param, NULL,
*/
int ltt_event_create(struct ltt_channel *chan,
struct lttng_ust_event *event_param,
- void *filter,
+ void (*filter)(struct ltt_event *event),
struct ltt_event **_event)
{
const struct lttng_event_desc *desc = NULL; /* silence gcc */