summaryrefslogtreecommitdiff
path: root/xkb/ddxLoad.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-05-12 18:54:51 +0000
committerMikhail Gusarov <dottedmag@dottedmag.net>2010-05-13 04:54:29 +0700
commit5a8e2f2745ae1f74501cd3f42614a1ed2cf974f2 (patch)
tree23726843ee080eba4bee2687fe33dd654dd50811 /xkb/ddxLoad.c
parentff2b4cf8329b1678adafcda02e5d47a072550d47 (diff)
Do not jump through the hoops to deallocate xkbbasedirflag variable
Fixes gcc warning as well. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'xkb/ddxLoad.c')
-rw-r--r--xkb/ddxLoad.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index a9b5ca984..b1d629436 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -186,7 +186,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
const char *emptystring = "";
- const char *xkbbasedirflag = emptystring;
+ char *xkbbasedirflag = NULL;
const char *xkbbindir = emptystring;
const char *xkbbindirsep = emptystring;
@@ -230,13 +230,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
xkbbindir, xkbbindirsep,
( (xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
- xkbbasedirflag, xkmfile,
+ xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
xkm_output_dir, keymap);
- if (xkbbasedirflag != emptystring) {
- free(xkbbasedirflag);
- }
+ free(xkbbasedirflag);
#ifndef WIN32
out= Popen(buf,"w");