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/OpenDis.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nx-X11/lib/X11/OpenDis.c') diff --git a/nx-X11/lib/X11/OpenDis.c b/nx-X11/lib/X11/OpenDis.c index dca8ae580..bb87a2285 100644 --- a/nx-X11/lib/X11/OpenDis.c +++ b/nx-X11/lib/X11/OpenDis.c @@ -182,7 +182,7 @@ XOpenDisplay ( /* * Attempt to allocate a display structure. Return NULL if allocation fails. */ - if ((dpy = (Display *)Xcalloc(1, sizeof(Display))) == NULL) { + if ((dpy = Xcalloc(1, sizeof(Display))) == NULL) { return(NULL); } @@ -356,9 +356,7 @@ fallback_success: dpy->qlen = 0; /* Set up free-function record */ - if ((dpy->free_funcs = (_XFreeFuncRec *)Xcalloc(1, - sizeof(_XFreeFuncRec))) - == NULL) { + if ((dpy->free_funcs = Xcalloc(1, sizeof(_XFreeFuncRec))) == NULL) { OutOfMemory (dpy, setup); return(NULL); } @@ -523,7 +521,7 @@ fallback_success: return (NULL); } - dpy->vendor = (char *) Xmalloc((unsigned) (u.setup->nbytesVendor + 1)); + dpy->vendor = Xmalloc(u.setup->nbytesVendor + 1); if (dpy->vendor == NULL) { OutOfMemory(dpy, setup); return (NULL); -- cgit v1.2.3