mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
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.
This commit is contained in:
parent
0fb4390526
commit
132b464d73
72 changed files with 343 additions and 376 deletions
|
|
@ -140,7 +140,7 @@ miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
|
|||
{
|
||||
miDCScreenPtr pScreenPriv;
|
||||
|
||||
pScreenPriv = (miDCScreenPtr) xalloc (sizeof (miDCScreenRec));
|
||||
pScreenPriv = xalloc (sizeof (miDCScreenRec));
|
||||
if (!pScreenPriv)
|
||||
return FALSE;
|
||||
|
||||
|
|
@ -229,9 +229,9 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
GCPtr pGC;
|
||||
XID gcvals[3];
|
||||
|
||||
pPriv = (miDCCursorPtr) xalloc (sizeof (miDCCursorRec));
|
||||
pPriv = xalloc (sizeof (miDCCursorRec));
|
||||
if (!pPriv)
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
#ifdef ARGB_CURSOR
|
||||
if (pCursor->bits->argb)
|
||||
{
|
||||
|
|
@ -243,7 +243,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
if (!pFormat)
|
||||
{
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pPriv->sourceBits = 0;
|
||||
|
|
@ -254,14 +254,14 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
if (!pPixmap)
|
||||
{
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
pGC = GetScratchGC (32, pScreen);
|
||||
if (!pGC)
|
||||
{
|
||||
(*pScreen->DestroyPixmap) (pPixmap);
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
ValidateGC (&pPixmap->drawable, pGC);
|
||||
(*pGC->ops->PutImage) (&pPixmap->drawable, pGC, 32,
|
||||
|
|
@ -275,7 +275,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
if (!pPriv->pPicture)
|
||||
{
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv);
|
||||
return pPriv;
|
||||
|
|
@ -286,14 +286,14 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
if (!pPriv->sourceBits)
|
||||
{
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
|
||||
if (!pPriv->maskBits)
|
||||
{
|
||||
(*pScreen->DestroyPixmap) (pPriv->sourceBits);
|
||||
xfree ((pointer) pPriv);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv);
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
if (!pGC)
|
||||
{
|
||||
(void) miDCUnrealizeCursor (pScreen, pCursor);
|
||||
return (miDCCursorPtr)NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue