aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBGetMap.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/XKBGetMap.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/XKBGetMap.c')
-rw-r--r--nx-X11/lib/X11/XKBGetMap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/nx-X11/lib/X11/XKBGetMap.c b/nx-X11/lib/X11/XKBGetMap.c
index db761611a..6e3c74343 100644
--- a/nx-X11/lib/X11/XKBGetMap.c
+++ b/nx-X11/lib/X11/XKBGetMap.c
@@ -211,13 +211,13 @@ _XkbReadKeySyms(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
map->num_syms = offset;
}
else {
- xkbSymMapWireDesc *newMap;
- XkbSymMapPtr oldMap;
- KeySym *newSyms;
- int tmp;
+ XkbSymMapPtr oldMap = &map->key_sym_map[rep->firstKeySym];
- oldMap = &map->key_sym_map[rep->firstKeySym];
for (i = 0; i < (int) rep->nKeySyms; i++, oldMap++) {
+ xkbSymMapWireDesc *newMap;
+ KeySym *newSyms;
+ int tmp;
+
newMap = (xkbSymMapWireDesc *)
_XkbGetReadBufferPtr(buf, SIZEOF(xkbSymMapWireDesc));
if (newMap == NULL)
@@ -310,7 +310,6 @@ static Status
_XkbReadKeyBehaviors(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
{
register int i;
- xkbBehaviorWireDesc *wire;
if (rep->totalKeyBehaviors > 0) {
int size = xkb->max_key_code + 1;
@@ -327,6 +326,8 @@ _XkbReadKeyBehaviors(XkbReadBufferPtr buf, XkbDescPtr xkb, xkbGetMapReply *rep)
(rep->nKeyBehaviors * sizeof(XkbBehavior)));
}
for (i = 0; i < rep->totalKeyBehaviors; i++) {
+ xkbBehaviorWireDesc *wire;
+
wire = (xkbBehaviorWireDesc *) _XkbGetReadBufferPtr(buf,
SIZEOF(xkbBehaviorWireDesc));
if (wire == NULL || wire->key >= size)