X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_trigger.c;h=776e24470aabdb78607ad9ffa4fb9fe01c0ea782;hp=092f3c8e2dd3991d03b97ad498a1f5909af3029b;hb=10685de6af924c0ea83e451697639ed9c16586cc;hpb=405f9e7db1cd7c023614ae249f0705fbb3da514c diff --git a/src/bin/lttng/commands/add_trigger.c b/src/bin/lttng/commands/add_trigger.c index 092f3c8e2..776e24470 100644 --- a/src/bin/lttng/commands/add_trigger.c +++ b/src/bin/lttng/commands/add_trigger.c @@ -994,22 +994,14 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv) goto error; } - res.er = lttng_event_rule_userspace_probe_create(); + res.er = lttng_event_rule_userspace_probe_create(userspace_probe_location); if (!res.er) { ERR("Failed to create userspace probe event rule."); goto error; } - event_rule_status = lttng_event_rule_userspace_probe_set_location( - res.er, userspace_probe_location); - if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) { - ERR("Failed to set user space probe event rule's location."); - goto error; - } - - event_rule_status = - lttng_event_rule_userspace_probe_set_event_name( - res.er, tracepoint_name); + event_rule_status = lttng_event_rule_userspace_probe_set_event_name( + res.er, tracepoint_name); if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) { ERR("Failed to set user space probe event rule's name to '%s'.", tracepoint_name);