- if ( (th->hysteresis > 0) && ((prev_state = uc_get_state(ds,vl)) != STATE_OKAY) )
- {
- switch(prev_state)
- {
- case STATE_ERROR:
- if ( (!isnan (th->failure_min) && ((th->failure_min + th->hysteresis) < values[ds_index])) ||
- (!isnan (th->failure_max) && ((th->failure_max - th->hysteresis) > values[ds_index])) )
- return (STATE_OKAY);
- else
- is_failure++;
- 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++;
- }
- }
- else { /* no hysteresis */
- if ((!isnan (th->failure_min) && (th->failure_min > values[ds_index]))
- || (!isnan (th->failure_max) && (th->failure_max < values[ds_index])))
+ if ((th->hysteresis > 0) &&
+ ((prev_state = uc_get_state(ds, vl)) != STATE_OKAY)) {
+ switch (prev_state) {
+ case STATE_ERROR:
+ if ((!isnan(th->failure_min) &&
+ ((th->failure_min + th->hysteresis) < values[ds_index])) ||
+ (!isnan(th->failure_max) &&
+ ((th->failure_max - th->hysteresis) > values[ds_index])))
+ return STATE_OKAY;
+ else
+ is_failure++;
+ 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++;
+ }
+ } else { /* no hysteresis */
+ if ((!isnan(th->failure_min) && (th->failure_min > values[ds_index])) ||
+ (!isnan(th->failure_max) && (th->failure_max < values[ds_index])))