keycodes: fix keymap compilation with no aliases and malloc(0)==NULL
authorRan Benita <ran234@gmail.com>
Wed, 10 Sep 2014 10:29:52 +0000 (13:29 +0300)
committerRan Benita <ran234@gmail.com>
Wed, 10 Sep 2014 10:44:33 +0000 (13:44 +0300)
commita931740cc70eff217ddf20492c6f500ac9f991e4
tree02624f9c0b5e6e5c2109fc47f253a4c887582116
parent7a87c202b70d6b0b5b5cedea5d49ace3c4c15535
keycodes: fix keymap compilation with no aliases and malloc(0)==NULL

If the keymap doesn't have any key-aliases (which is certainly
possible), the calloc(num_key_aliases, ...) is allowed to return NULL
according to the C standard, but this is not an error.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/keycodes.c
test/data/keymaps/no-aliases.xkb [new file with mode: 0644]
test/filecomp.c