diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-11-18 10:10:49 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-11-18 10:11:43 +1000 |
commit | 8fecb19147ca12980f36a7936341ab432c67948e (patch) | |
tree | b49a155632cc50dee49e058279f5ee260e96d542 /tools | |
parent | b5f0536a4f9370f52355a5c7760d2e3f14d8c7c1 (diff) | |
download | libinput-8fecb19147ca12980f36a7936341ab432c67948e.tar.gz |
Use bit(foo) instead of (1 << foo)
Translates to the same thing, but the bit() helper is nicer and less
likely to be typoed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libinput-record.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/libinput-record.c b/tools/libinput-record.c index 8ed14b5d..7adebdf2 100644 --- a/tools/libinput-record.c +++ b/tools/libinput-record.c @@ -48,6 +48,7 @@ #include "libinput-git-version.h" #include "shared.h" #include "builddir.h" +#include "util-bits.h" #include "util-list.h" #include "util-time.h" #include "util-input-event.h" @@ -391,9 +392,9 @@ handle_evdev_frame(struct record_device *d) assert(slot < sizeof(d->touch.slot_state) * 8); if (e.value != -1) - d->touch.slot_state |= 1 << slot; + d->touch.slot_state |= bit(slot); else - d->touch.slot_state &= ~(1 << slot); + d->touch.slot_state &= ~bit(slot); } if (e.type == EV_SYN && e.code == SYN_REPORT) |