Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
filter_expression = NULL;
filter = NULL;
exclusion = NULL;
- if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
+ if (ret == LTTNG_ERR_UST_EVENT_ENABLED) {
+ goto already_enabled;
+ } else if (ret != LTTNG_OK) {
goto error;
}
break;
filter_copy, NULL, wpipe);
}
- if (ret != LTTNG_OK && ret != LTTNG_ERR_UST_EVENT_ENABLED) {
+ if (ret == LTTNG_ERR_UST_EVENT_ENABLED) {
+ goto already_enabled;
+ } else if (ret != LTTNG_OK) {
goto error;
}
ret = LTTNG_OK;
+already_enabled:
error:
free(filter_expression);
free(filter);