if (ds != NULL) {
ds_name = ds->ds[ds_index].name;
if ((th->data_source[0] != 0) && (strcmp(ds_name, th->data_source) != 0))
if (ds != NULL) {
ds_name = ds->ds[ds_index].name;
if ((th->data_source[0] != 0) && (strcmp(ds_name, th->data_source) != 0))
/* XXX: This is an experimental code, not optimized, not fast, not reliable,
* and probably, do not work as you expect. Enjoy! :D */
/* XXX: This is an experimental code, not optimized, not fast, not reliable,
* and probably, do not work as you expect. Enjoy! :D */
- if ((th->hysteresis > 0) &&
- ((prev_state = uc_get_state(ds, vl)) != STATE_OKAY)) {
+ prev_state = uc_get_state(ds, vl);
+ if ((th->hysteresis > 0) && (prev_state != STATE_OKAY) &&
+ (prev_state != STATE_UNKNOWN)) {