diff options
author | Diego Nieto Cid <dnietoc@gmail.com> | 2010-08-21 03:17:11 -0300 |
---|---|---|
committer | Diego Nieto Cid <dnietoc@gmail.com> | 2011-04-08 14:36:20 -0300 |
commit | 91fba13c9c8dfdaab7e98e5d3bee1b0085b2d2aa (patch) | |
tree | ebabaf9c9d568f5206a70262b5426484f14f5e09 /console-client/xkb/parser.y | |
parent | 29591363f86e5e0e7c3b3c058c0f77970b1e6680 (diff) |
Fix handling of error conditions.
* console-client/xkb/parser.y (key_set_action): Test actions variable.
(key_set_keysym): Test keysyms instead of keys.
Diffstat (limited to 'console-client/xkb/parser.y')
-rw-r--r-- | console-client/xkb/parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console-client/xkb/parser.y b/console-client/xkb/parser.y index 854ee408..36bc3a3f 100644 --- a/console-client/xkb/parser.y +++ b/console-client/xkb/parser.y @@ -1379,7 +1379,7 @@ key_set_keysym (struct key *key, group_t group, int level, symbol ks) { keysyms = realloc (keysyms, (level + 1)*sizeof(symbol)); - if (!keys) + if (!keysyms) { fprintf (stderr, "No mem\n"); exit (EXIT_FAILURE); @@ -1412,7 +1412,7 @@ key_set_action (struct key *key, group_t group, int level, xkb_action_t *action) /* Levels between 'width' and 'level' have no actions defined. */ memset (&actions[width], 0, (level - width)*sizeof(xkb_action_t *)); - if (!keys) + if (!actions) { fprintf (stderr, "No mem\n"); exit (EXIT_FAILURE); |