summaryrefslogtreecommitdiff
path: root/dix/gc.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-01-22 02:11:16 -0500
committerAdam Jackson <ajax@redhat.com>2009-01-22 02:11:16 -0500
commit132b464d734b077038e19b21e46d3a6258f4b998 (patch)
tree4fe179cf69d6013a32aaa8e17a28b3fc905e6274 /dix/gc.c
parent0fb4390526bb829ab17ff4635d41a3012f63c1b2 (diff)
Remove a bunch of useless casts.
We've had void * for twenty years now people let's try to act like we know how it works.
Diffstat (limited to 'dix/gc.c')
-rw-r--r--dix/gc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/dix/gc.c b/dix/gc.c
index 09d12b671..0eb9238a7 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -470,7 +470,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
{
unsigned char *dash;
- dash = (unsigned char *)xalloc(2 * sizeof(unsigned char));
+ dash = xalloc(2 * sizeof(unsigned char));
if (dash)
{
if (pGC->dash != DefaultDash)
@@ -579,7 +579,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
{
GCPtr pGC;
- pGC = (GCPtr)xalloc(sizeof(GC));
+ pGC = xalloc(sizeof(GC));
if (!pGC)
{
*pStatus = BadAlloc;
@@ -829,8 +829,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask)
unsigned char *dash;
unsigned int i;
- dash = (unsigned char *)xalloc(pgcSrc->numInDashList *
- sizeof(unsigned char));
+ dash = xalloc(pgcSrc->numInDashList * sizeof(unsigned char));
if (dash)
{
if (pgcDst->dash != DefaultDash)
@@ -909,7 +908,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
{
GCPtr pGC;
- pGC = (GCPtr)xalloc(sizeof(GC));
+ pGC = xalloc(sizeof(GC));
if (!pGC)
return (GCPtr)NULL;
@@ -1069,9 +1068,9 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash)
}
if (ndash & 1)
- p = (unsigned char *)xalloc(2 * ndash * sizeof(unsigned char));
+ p = xalloc(2 * ndash * sizeof(unsigned char));
else
- p = (unsigned char *)xalloc(ndash * sizeof(unsigned char));
+ p = xalloc(ndash * sizeof(unsigned char));
if (!p)
return BadAlloc;
@@ -1166,7 +1165,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
if (newct < 0)
return(BadMatch);
size = nrects * sizeof(xRectangle);
- prectsNew = (xRectangle *) xalloc(size);
+ prectsNew = xalloc(size);
if (!prectsNew && size)
return BadAlloc;