Skip to content

Commit 251172a

Browse files
committed
fix: code review
1 parent 89be1b9 commit 251172a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/detection/keyboard/keyboard_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
static void addDevice(FFlist* devices, uint64_t* flags, uint32_t index, FFstrbuf* path)
66
{
7-
if (index >= 64 || (*flags & (1UL << index)))
7+
if (index >= 64 || (*flags & (1ULL << index)))
88
return;
9-
*flags |= (1UL << index);
109

1110
ffStrbufSetF(path, "/sys/class/input/event%u/device/name", (unsigned) index);
1211

1312
FF_STRBUF_AUTO_DESTROY name = ffStrbufCreate();
1413
if (ffAppendFileBuffer(path->chars, &name))
1514
{
15+
*flags |= (1ULL << index);
1616
ffStrbufTrimRightSpace(&name);
1717
ffStrbufSubstrBefore(path, path->length - (uint32_t) strlen("name"));
1818

0 commit comments

Comments
 (0)