aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/KeyBind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/KeyBind.c')
-rw-r--r--libX11/src/KeyBind.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libX11/src/KeyBind.c b/libX11/src/KeyBind.c
index f22feca59..2110772ce 100644
--- a/libX11/src/KeyBind.c
+++ b/libX11/src/KeyBind.c
@@ -997,11 +997,9 @@ XRebindKeysym (
tmp = dpy->key_bindings;
nb = sizeof(KeySym) * nm;
- if ((! (p = (struct _XKeytrans *) Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
- ((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) &&
- (nbytes > 0)) ||
- ((! (p->modifiers = (KeySym *) Xmalloc( (unsigned) nb))) &&
- (nb > 0))) {
+ if ((! (p = Xcalloc( 1, sizeof(struct _XKeytrans)))) ||
+ ((! (p->string = Xmalloc(nbytes))) && (nbytes > 0)) ||
+ ((! (p->modifiers = Xmalloc(nb))) && (nb > 0))) {
if (p) {
if (p->string) Xfree(p->string);
if (p->modifiers) Xfree((char *) p->modifiers);