From d38527e25f8b6e2f1174ecc21260c5c5416f972e 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 --- src/Font.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Font.c') diff --git a/src/Font.c b/src/Font.c index 5dbdb297..3beb8a52 100644 --- a/src/Font.c +++ b/src/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; } @@ -323,7 +323,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; @@ -459,7 +459,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; } @@ -521,14 +521,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); @@ -555,7 +555,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); -- cgit v1.2.3