diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c
index 45fa170..1154c15 100644
--- a/plugins/sixaxis.c
+++ b/plugins/sixaxis.c
struct udev_device *hid_parent;
uint16_t vid, pid;
const char *hid_id;
- int i;
+ guint i;
hid_parent = udev_device_get_parent_with_subsystem_devtype(udevice,
"hid", NULL);
if (sscanf(hid_id, "%hx:%hx:%hx", bus, &vid, &pid) != 3)
return -1;
- for (i = 0; G_N_ELEMENTS(devices); i++) {
+ for (i = 0; i < G_N_ELEMENTS(devices); i++) {
if (devices[i].vid == vid && devices[i].pid == pid)
return i;
}