diff options
author | Adam Jackson <ajax@redhat.com> | 2009-04-03 11:32:00 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-04-03 18:22:19 -0400 |
commit | a99b0ab918998c9a1b9f8692591b8cb59a12eb9e (patch) | |
tree | bfdf25fde28530c6178009b2669651b7baa4aa0a | |
parent | 4da347adb1fcc39e8f4fb2cadd98e887d7ac877a (diff) |
DPMS: Fix cast abuse
-rw-r--r-- | hw/xfree86/common/xf86DPMS.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 85be6036a..03a6d0cbf 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -71,7 +70,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) xcalloc(sizeof(DPMSRec), 1))) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); pScrn->DPMSSet = set; pDPMS->Flags = flags; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); @@ -112,7 +111,7 @@ DPMSClose(int i, ScreenPtr pScreen) if (DPMSKey == NULL) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); /* This shouldn't happen */ if (!pDPMS) @@ -130,7 +129,7 @@ DPMSClose(int i, ScreenPtr pScreen) xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); } - xfree((pointer)pDPMS); + xfree(pDPMS); dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) DPMSKey = NULL; @@ -164,8 +163,7 @@ DPMSSet(ClientPtr client, int level) /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { xf86EnableAccess(pScrn); pScrn->DPMSSet(pScrn, level, 0); @@ -193,8 +191,7 @@ DPMSSupported(void) /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet) return TRUE; } |