diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 3bb363b47..7df4ce838 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -871,8 +871,6 @@ XkbError: FILE *file; XkbConfigRtrnRec config; - int nxagentXkbConfigFilePathSize; - char *nxagentXkbConfigFilePath; XkbComponentNamesRec names; @@ -1019,22 +1017,15 @@ XkbError: XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); if (nxagentX2go) - nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); + nxagentXkbConfigFilePath = strdup(XKB_CONFIG_FILE_X2GO); else - nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); - - nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char)); + nxagentXkbConfigFilePath = strdup(XKB_CONFIG_FILE_NX); - if ( nxagentXkbConfigFilePath == NULL) + if (nxagentXkbConfigFilePath == NULL) { FatalError("nxagentKeyboardProc: malloc failed."); } - if (nxagentX2go) - nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO); - else - nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX); - #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n", nxagentXkbConfigFilePath); |