From e15023b2ad2a5ca8742cbb93fe10cb38ab079831 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 7 Mar 2013 23:46:05 -0800 Subject: Remove more unnecessary casts from Xmalloc/calloc calls Signed-off-by: Alan Coopersmith Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/KeyBind.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nx-X11/lib/X11/KeyBind.c') diff --git a/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c index d473f907c..e29aeddc0 100644 --- a/nx-X11/lib/X11/KeyBind.c +++ b/nx-X11/lib/X11/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); -- cgit v1.2.3