diff options
author | marha <marha@users.sourceforge.net> | 2009-12-15 08:09:08 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-15 08:09:08 +0000 |
commit | c915fe74ff1b1d02f7506a187bc9b588f5c21f97 (patch) | |
tree | 7ecc8f8867bac10fcfc1299469333178f7cf5838 /xorg-server/xkb/xkb.c | |
parent | 0925cb4f76a1667fb3777efbe6a0e0e69c4cca3c (diff) | |
parent | 9b17452909d3140fa33a753cadfaa6e9006b9685 (diff) | |
download | vcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.tar.gz vcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.tar.bz2 vcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.zip |
svn merge ^/branches/released
Diffstat (limited to 'xorg-server/xkb/xkb.c')
-rw-r--r-- | xorg-server/xkb/xkb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c index 62152b66a..2b06f3187 100644 --- a/xorg-server/xkb/xkb.c +++ b/xorg-server/xkb/xkb.c @@ -3273,20 +3273,21 @@ _XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator, int *led_return)
{
XkbIndicatorMapPtr map;
- int led;
/* search for the right indicator */
map = NULL;
if (sli->names && sli->maps) {
+ int led;
+
for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
if (sli->names[led] == indicator) {
map= &sli->maps[led];
+ *led_return = led;
break;
}
}
}
- *led_return = led;
return map;
}
@@ -4298,9 +4299,12 @@ ProcXkbSetNames(ClientPtr client) static char *
XkbWriteCountedString(char *wire,char *str,Bool swap)
{
-CARD16 len,*pLen;
+ CARD16 len,*pLen;
+
+ if (!str)
+ return wire;
- len= (str?strlen(str):0);
+ len= strlen(str);
pLen= (CARD16 *)wire;
*pLen= len;
if (swap) {
|