aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBNames.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-08-16 18:27:28 -0700
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:28 +0200
commit2824899d280f2b169b3e745b222f9a981c1ce5f7 (patch)
treeb36bb27f59fc802561e78aa344755808b71a0279 /nx-X11/lib/X11/XKBNames.c
parent3c5880e7254dcd04ea8e54d53ec99880e2dfdc27 (diff)
downloadnx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.tar.gz
nx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.tar.bz2
nx-libs-2824899d280f2b169b3e745b222f9a981c1ce5f7.zip
Rearrange some variable declarations & initializations in XKB
Little things noticed during XKB restyling that seemed to make the code easier to read. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/XKBNames.c')
-rw-r--r--nx-X11/lib/X11/XKBNames.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c
index 7eaf92335..3cfd02f96 100644
--- a/nx-X11/lib/X11/XKBNames.c
+++ b/nx-X11/lib/X11/XKBNames.c
@@ -116,14 +116,14 @@ _XkbReadGetNamesReply(Display *dpy,
if (rep->which & XkbKTLevelNamesMask) {
CARD8 *nLevels;
XkbClientMapPtr map = xkb->map;
- XkbKeyTypePtr type;
nLevels =
(CARD8 *) _XkbGetReadBufferPtr(&buf, XkbPaddedSize(rep->nTypes));
if (nLevels == NULL)
goto BAILOUT;
if (map != NULL) {
- type = map->types;
+ XkbKeyTypePtr type = map->types;
+
for (i = 0; i < (int) rep->nTypes; i++, type++) {
if (i >= map->num_types) {
if (!_XkbSkipReadBufferData(&buf, nLevels[i] * 4))
@@ -577,14 +577,14 @@ XkbChangeNames(Display *dpy, XkbDescPtr xkb, XkbNameChangesPtr changes)
names = xkb->names;
if (which & (XkbKTLevelNamesMask | XkbKeyTypeNamesMask)) {
register int i;
- XkbKeyTypePtr type;
if ((xkb->map == NULL) || (xkb->map->types == NULL) || (nTypes == 0) ||
(firstType + nTypes > xkb->map->num_types) ||
(firstLvlType + nLvlTypes > xkb->map->num_types))
return False;
if (which & XkbKTLevelNamesMask) {
- type = &xkb->map->types[firstLvlType];
+ XkbKeyTypePtr type = &xkb->map->types[firstLvlType];
+
for (i = nLvlNames = 0; i < nLvlTypes; i++, type++) {
if (type->level_names != NULL)
nLvlNames += type->num_levels;