Checking also warning limits was just executing redundant code, but
otherwise harmless as later code checks failure count first.
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
(!isnan(th->failure_max) &&
((th->failure_max - th->hysteresis) > values[ds_index])))
return STATE_OKAY;
- else
- is_failure++;
+ is_failure++;
+ break;
case STATE_WARNING:
if ((!isnan(th->warning_min) &&
((th->warning_min + th->hysteresis) < values[ds_index])) ||
(!isnan(th->warning_max) &&
((th->warning_max - th->hysteresis) > values[ds_index])))
return STATE_OKAY;
- else
- is_warning++;
+ is_warning++;
+ break;
}
} else { /* no hysteresis */
if ((!isnan(th->failure_min) && (th->failure_min > values[ds_index])) ||