summaryrefslogtreecommitdiff
path: root/src/xkbcomp/xkbcomp.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-05-13 18:45:43 +0300
committername <email>2012-05-18 20:54:33 +0300
commit75ff2cefdaf03008dcbe5d721315851eb46dfabc (patch)
tree97db0b11fafad9ba444090601eacfa634d693ce8 /src/xkbcomp/xkbcomp.c
parentb571b8345928056aaf172d01a9f8c0aa84e484cf (diff)
downloadlibxkbcommon-75ff2cefdaf03008dcbe5d721315851eb46dfabc.tar.gz
libxkbcommon-75ff2cefdaf03008dcbe5d721315851eb46dfabc.tar.bz2
libxkbcommon-75ff2cefdaf03008dcbe5d721315851eb46dfabc.zip
Various static analyzer fixes
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/xkbcomp.c')
-rw-r--r--src/xkbcomp/xkbcomp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xkbcomp/xkbcomp.c b/src/xkbcomp/xkbcomp.c
index 7e8763c..8518a1d 100644
--- a/src/xkbcomp/xkbcomp.c
+++ b/src/xkbcomp/xkbcomp.c
@@ -199,7 +199,10 @@ compile_keymap(struct xkb_context *ctx, XkbFile *file)
/* Find map to use */
mapToUse = XkbChooseMap(file, NULL);
- if (!mapToUse || mapToUse->type != XkmKeymapFile) {
+ if (!mapToUse)
+ goto err;
+
+ if (mapToUse->type != XkmKeymapFile) {
ERROR("file type %d not handled\n", mapToUse->type);
goto err;
}