ERR("Invalid buffer condition: a target channel name must be set.");
goto end;
}
- if (!usage->threshold_ratio.set && !usage->threshold_bytes.set) {
- ERR("Invalid buffer condition: a threshold must be set.");
+ if (usage->threshold_ratio.set == usage->threshold_bytes.set) {
+ ERR("Invalid buffer condition: a threshold must be set or both type cannot be used simultaneously.");
goto end;
}
if (!usage->domain.set) {
int ret;
struct lttng_condition_buffer_usage *usage;
size_t session_name_len, channel_name_len;
- struct lttng_condition_buffer_usage_comm usage_comm;
+ struct lttng_condition_buffer_usage_comm usage_comm = {};
if (!condition || !IS_USAGE_CONDITION(condition)) {
ret = -1;