From 8fecb19147ca12980f36a7936341ab432c67948e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 18 Nov 2021 10:10:49 +1000 Subject: 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 --- tools/libinput-record.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') 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) -- cgit v1.2.1