{
int i;
- for (i = 0; in_evdev_defbinds[i].bit != 0; i++) {
+ for (i = 0; ; i++) {
+ if (in_evdev_defbinds[i].bit == 0 && in_evdev_defbinds[i].code == 0)
+ break;
binds[IN_BIND_OFFS(in_evdev_defbinds[i].code, in_evdev_defbinds[i].btype)] =
1 << in_evdev_defbinds[i].bit;
}