- 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.");