Invert an if condition

Go from:
  if (a != b)
     continue;
  foo;

to:
  if (a == b) {
      foo;
  }

Basically just an indentation change after the condition inversion, makes the
follow-up patch easier to review.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-02-13 21:09:24 +10:00
parent 507bd1ee28
commit 2056da9517

View file

@ -740,15 +740,14 @@ terminate_slots(struct libevdev *dev,
bool touches_stopped = false; bool touches_stopped = false;
for (int slot = 0; slot < dev->num_slots; slot++) { for (int slot = 0; slot < dev->num_slots; slot++) {
if (changes[slot].state != TOUCH_CHANGED) if (changes[slot].state == TOUCH_CHANGED) {
continue;
queue_push_event(dev, EV_ABS, ABS_MT_SLOT, slot); queue_push_event(dev, EV_ABS, ABS_MT_SLOT, slot);
queue_push_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1); queue_push_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
*last_reported_slot = slot; *last_reported_slot = slot;
touches_stopped = true; touches_stopped = true;
} }
}
/* If any of the touches stopped, we need to split the sync state /* If any of the touches stopped, we need to split the sync state
into two frames - one with all the stopped touches, one with the into two frames - one with all the stopped touches, one with the