X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=ae2db857dd7835554c57f9683bae6ce5524a3445;hb=cc3b9644f017a91d347d7a414387292e3175635e;hp=4f136550cc32b2dc9aaa277af49fe60e9f664e0a;hpb=50f71cad1a1a1e29d0e6cc6577127b88b9dba50f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 4f136550c..ae2db857d 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1249,6 +1249,7 @@ static struct ust_app_event_notifier_rule *alloc_ust_app_event_notifier_rule( { enum lttng_event_rule_generate_exclusions_status generate_exclusion_status; + enum lttng_condition_status cond_status; struct ust_app_event_notifier_rule *ua_event_notifier_rule; struct lttng_condition *condition = NULL; const struct lttng_event_rule *event_rule = NULL; @@ -1269,9 +1270,9 @@ static struct ust_app_event_notifier_rule *alloc_ust_app_event_notifier_rule( assert(lttng_condition_get_type(condition) == LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES); - assert(LTTNG_CONDITION_STATUS_OK == - lttng_condition_event_rule_matches_get_rule( - condition, &event_rule)); + cond_status = lttng_condition_event_rule_matches_get_rule( + condition, &event_rule); + assert(cond_status == LTTNG_CONDITION_STATUS_OK); assert(event_rule); ua_event_notifier_rule->error_counter_index = @@ -3013,7 +3014,7 @@ static int duplicate_stream_object(struct buffer_reg_stream *reg_stream, assert(reg_stream); assert(stream); - /* Reserve the amount of file descriptor we need. */ + /* Duplicating a stream requires 2 new fds. Reserve them. */ ret = lttng_fd_get(LTTNG_FD_APPS, 2); if (ret < 0) { ERR("Exhausted number of available FD upon duplicate stream"); @@ -3049,7 +3050,7 @@ static int duplicate_channel_object(struct buffer_reg_channel *buf_reg_chan, assert(buf_reg_chan); assert(ua_chan); - /* Need two fds for the channel. */ + /* Duplicating a channel requires 1 new fd. Reserve it. */ ret = lttng_fd_get(LTTNG_FD_APPS, 1); if (ret < 0) { ERR("Exhausted number of available FD upon duplicate channel");