diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-03-07 23:46:05 -0800 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:27 +0200 |
commit | e15023b2ad2a5ca8742cbb93fe10cb38ab079831 (patch) | |
tree | ac6b9de01f8f71b15392cc5216e53220da288e75 /nx-X11/lib/X11/Font.c | |
parent | 47d0ea1ba5bdd53d5df2cd06ffb637c889cf5e03 (diff) | |
download | nx-libs-e15023b2ad2a5ca8742cbb93fe10cb38ab079831.tar.gz nx-libs-e15023b2ad2a5ca8742cbb93fe10cb38ab079831.tar.bz2 nx-libs-e15023b2ad2a5ca8742cbb93fe10cb38ab079831.zip |
Remove more unnecessary casts from Xmalloc/calloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/Font.c')
-rw-r--r-- | nx-X11/lib/X11/Font.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index d311cd0f7..cc08fda27 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/Font.c @@ -215,7 +215,7 @@ _XQueryFont ( DeqAsyncHandler(dpy, &async); reply_left = reply.length - ((SIZEOF(xQueryFontReply) - SIZEOF(xReply)) >> 2); - if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) { + if (! (fs = Xmalloc (sizeof (XFontStruct)))) { _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; } @@ -324,7 +324,7 @@ _XF86BigfontCodes ( if (pData) return (XF86BigfontCodes *) pData->private_data; - pData = (XExtData *) Xmalloc(sizeof(XExtData) + sizeof(XF86BigfontCodes)); + pData = Xmalloc(sizeof(XExtData) + sizeof(XF86BigfontCodes)); if (!pData) { /* Out of luck. */ return (XF86BigfontCodes *) NULL; @@ -460,7 +460,7 @@ _XF86BigfontQueryFont ( DeqAsyncHandler(dpy, &async1); reply_left = reply.length - ((SIZEOF(xXF86BigfontQueryFontReply) - SIZEOF(xReply)) >> 2); - if (! (fs = (XFontStruct *) Xmalloc (sizeof (XFontStruct)))) { + if (! (fs = Xmalloc (sizeof (XFontStruct)))) { _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; } @@ -523,14 +523,14 @@ _XF86BigfontQueryFont ( nbytes = reply.nUniqCharInfos * SIZEOF(xCharInfo) + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16); - pUniqCI = (xCharInfo *) Xmalloc (nbytes); + pUniqCI = Xmalloc (nbytes); if (!pUniqCI) { if (fs->properties) Xfree((char *) fs->properties); Xfree((char *) fs); _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; } - if (! (fs->per_char = (XCharStruct *) Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) { + if (! (fs->per_char = Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) { Xfree((char *) pUniqCI); if (fs->properties) Xfree((char *) fs->properties); Xfree((char *) fs); @@ -557,7 +557,7 @@ _XF86BigfontQueryFont ( XEDataObject fs_union; char *addr; - pData = (XExtData *) Xmalloc(sizeof(XExtData)); + pData = Xmalloc(sizeof(XExtData)); if (!pData) { if (fs->properties) Xfree((char *) fs->properties); Xfree((char *) fs); |