Skip to contentSkip to conversation

fakehid: Use the same constant as declared

PATCH New Bastien Nocera 1 participant 1 message Sep 7, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 fakehid: Use the same constant as declared

ps3remote_keymap[] uses 0xff as the max value, so should we.

---
 profiles/input/fakehid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
profiles/input/fakehid.c +1 -1
index b12c526..e665869 100644
@@ -328,7 +328,7 @@ static int ps3remote_setup_uinput(struct fake_input *fake,
 	}
 
 	/* enabling keys */
-	for (i = 0; i < 256; i++)
+	for (i = 0; i < 0xff; i++)
 		if (ps3remote_keymap[i] != KEY_RESERVED)
 			if (ioctl(fake->uinput, UI_SET_KEYBIT,
 						ps3remote_keymap[i]) < 0) {
Signature · 1 line
1.7.12