summaryrefslogtreecommitdiff
path: root/Xext/xvmain.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 /Xext/xvmain.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 'Xext/xvmain.c')
-rw-r--r--Xext/xvmain.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index 6184e4e77..477194684 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -273,7 +273,7 @@ XvScreenInit(ScreenPtr pScreen)
/* ALLOCATE SCREEN PRIVATE RECORD */
- pxvs = (XvScreenPtr) xalloc (sizeof (XvScreenRec));
+ pxvs = xalloc (sizeof (XvScreenRec));
if (!pxvs)
{
ErrorF("XvScreenInit: Unable to allocate screen private structure\n");
@@ -367,11 +367,10 @@ XvDestroyPixmap(PixmapPtr pPix)
{
XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
- (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp,
- pp->pDraw);
+ (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
- pp->pDraw = (DrawablePtr)NULL;
- pp->client = (ClientPtr)NULL;
+ pp->pDraw = NULL;
+ pp->client = NULL;
pp->time = currentTime;
}
pp++;
@@ -419,11 +418,10 @@ XvDestroyWindow(WindowPtr pWin)
{
XvdiSendVideoNotify(pp, pp->pDraw, XvPreempted);
- (void)(* pp->pAdaptor->ddStopVideo)((ClientPtr)NULL, pp,
- pp->pDraw);
+ (void)(* pp->pAdaptor->ddStopVideo)(NULL, pp, pp->pDraw);
- pp->pDraw = (DrawablePtr)NULL;
- pp->client = (ClientPtr)NULL;
+ pp->pDraw = NULL;
+ pp->client = NULL;
pp->time = currentTime;
}
pp++;
@@ -455,8 +453,8 @@ XvdiVideoStopped(XvPortPtr pPort, int reason)
XvdiSendVideoNotify(pPort, pPort->pDraw, reason);
- pPort->pDraw = (DrawablePtr)NULL;
- pPort->client = (ClientPtr)NULL;
+ pPort->pDraw = NULL;
+ pPort->client = NULL;
pPort->time = currentTime;
return Success;
@@ -472,7 +470,7 @@ XvdiDestroyPort(pointer pPort, XID id)
static int
XvdiDestroyGrab(pointer pGrab, XID id)
{
- ((XvGrabPtr)pGrab)->client = (ClientPtr)NULL;
+ ((XvGrabPtr)pGrab)->client = NULL;
return Success;
}
@@ -481,7 +479,7 @@ XvdiDestroyVideoNotify(pointer pn, XID id)
{
/* JUST CLEAR OUT THE client POINTER FIELD */
- ((XvVideoNotifyPtr)pn)->client = (ClientPtr)NULL;
+ ((XvVideoNotifyPtr)pn)->client = NULL;
return Success;
}
@@ -490,7 +488,7 @@ XvdiDestroyPortNotify(pointer pn, XID id)
{
/* JUST CLEAR OUT THE client POINTER FIELD */
- ((XvPortNotifyPtr)pn)->client = (ClientPtr)NULL;
+ ((XvPortNotifyPtr)pn)->client = NULL;
return Success;
}
@@ -852,7 +850,7 @@ XvdiGrabPort(
if ((pPort->pDraw) && (client != pPort->client))
{
- XvdiStopVideo((ClientPtr)NULL, pPort, pPort->pDraw);
+ XvdiStopVideo(NULL, pPort, pPort->pDraw);
}
pPort->grab.client = client;
@@ -891,7 +889,7 @@ XvdiUngrabPort(
/* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */
FreeResource(pPort->grab.id, XvRTGrab);
- pPort->grab.client = (ClientPtr)NULL;
+ pPort->grab.client = NULL;
pPort->time = currentTime;
@@ -921,9 +919,9 @@ XvdiSelectVideoNotify(
if (!pn)
{
- if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec))))
+ if (!(tpn = xalloc(sizeof(XvVideoNotifyRec))))
return BadAlloc;
- tpn->next = (XvVideoNotifyPtr)NULL;
+ tpn->next = NULL;
if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn))
{
xfree(tpn);
@@ -934,13 +932,13 @@ XvdiSelectVideoNotify(
{
/* LOOK TO SEE IF ENTRY ALREADY EXISTS */
- fpn = (XvVideoNotifyPtr)NULL;
+ fpn = NULL;
tpn = pn;
while (tpn)
{
if (tpn->client == client)
{
- if (!onoff) tpn->client = (ClientPtr)NULL;
+ if (!onoff) tpn->client = NULL;
return Success;
}
if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */
@@ -959,7 +957,7 @@ XvdiSelectVideoNotify(
}
else
{
- if (!(tpn = (XvVideoNotifyPtr)xalloc(sizeof(XvVideoNotifyRec))))
+ if (!(tpn = xalloc(sizeof(XvVideoNotifyRec))))
return BadAlloc;
tpn->next = pn->next;
pn->next = tpn;
@@ -969,7 +967,7 @@ XvdiSelectVideoNotify(
/* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */
/* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */
- tpn->client = (ClientPtr)NULL;
+ tpn->client = NULL;
tpn->id = FakeClientID(client->index);
AddResource(tpn->id, XvRTVideoNotify, tpn);
@@ -988,7 +986,7 @@ XvdiSelectPortNotify(
/* SEE IF CLIENT IS ALREADY IN LIST */
- tpn = (XvPortNotifyPtr)NULL;
+ tpn = NULL;
pn = pPort->pNotify;
while (pn)
{
@@ -1005,7 +1003,7 @@ XvdiSelectPortNotify(
if (!onoff)
{
- pn->client = (ClientPtr)NULL;
+ pn->client = NULL;
FreeResource(pn->id, XvRTPortNotify);
}
@@ -1017,7 +1015,7 @@ XvdiSelectPortNotify(
if (!tpn)
{
- if (!(tpn = (XvPortNotifyPtr)xalloc(sizeof(XvPortNotifyRec))))
+ if (!(tpn = xalloc(sizeof(XvPortNotifyRec))))
return BadAlloc;
tpn->next = pPort->pNotify;
pPort->pNotify = tpn;
@@ -1060,7 +1058,7 @@ XvdiStopVideo(
status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pDraw);
- pPort->pDraw = (DrawablePtr)NULL;
+ pPort->pDraw = NULL;
pPort->client = (ClientPtr)client;
pPort->time = currentTime;
@@ -1084,7 +1082,7 @@ XvdiPreemptVideo(
status = (* pPort->pAdaptor->ddStopVideo)(client, pPort, pPort->pDraw);
- pPort->pDraw = (DrawablePtr)NULL;
+ pPort->pDraw = NULL;
pPort->client = (ClientPtr)client;
pPort->time = currentTime;