XKB: Simplify a loop in ProcXkbGetKbdByName
Replace: for (stuff; things; etc) { if (misc || other) { [...] } } with: for (stuff; things; etc) { if (!misc && !other) continue; [...] } Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
72b6639c83
commit
b8540d18c7
|
@ -5870,7 +5870,9 @@ ProcXkbGetKbdByName(ClientPtr client)
|
||||||
xkb->ctrls->num_groups= nTG;
|
xkb->ctrls->num_groups= nTG;
|
||||||
|
|
||||||
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) {
|
||||||
if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) {
|
if (tmpd != dev && GetMaster(tmpd, MASTER_KEYBOARD) != dev)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (tmpd != dev)
|
if (tmpd != dev)
|
||||||
XkbCopyDeviceKeymap(tmpd, dev);
|
XkbCopyDeviceKeymap(tmpd, dev);
|
||||||
|
|
||||||
|
@ -5886,7 +5888,6 @@ ProcXkbGetKbdByName(ClientPtr client)
|
||||||
XkbFreeSrvLedInfo(old_sli);
|
XkbFreeSrvLedInfo(old_sli);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
nkn.deviceID= nkn.oldDeviceID= dev->id;
|
nkn.deviceID= nkn.oldDeviceID= dev->id;
|
||||||
nkn.minKeyCode= new->min_key_code;
|
nkn.minKeyCode= new->min_key_code;
|
||||||
|
|
Loading…
Reference in New Issue