diff options
author | Ran Benita <ran234@gmail.com> | 2012-05-13 18:45:43 +0300 |
---|---|---|
committer | name <email> | 2012-05-18 20:54:33 +0300 |
commit | 75ff2cefdaf03008dcbe5d721315851eb46dfabc (patch) | |
tree | 97db0b11fafad9ba444090601eacfa634d693ce8 /src/xkbcomp/xkbcomp.c | |
parent | b571b8345928056aaf172d01a9f8c0aa84e484cf (diff) | |
download | libxkbcommon-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.c | 5 |
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; } |