Fix sparse warnings about using 0 for NULL.

This commit is contained in:
Eric Anholt 2007-03-15 10:12:14 -07:00
parent 8ae6ad9332
commit 8b06ab50bb
2 changed files with 13 additions and 13 deletions

View File

@ -2217,7 +2217,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
}
fbPictureInit(pScreen, 0, 0);
fbPictureInit(pScreen, NULL, 0);
xf86SetBlackWhitePixels(pScreen);
@ -2276,18 +2276,18 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* Use driver specific palette load routines for Direct Color support. -jens */
if (pScrn->bitsPerPixel == 16) {
if (pScrn->depth == 15) {
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette15, 0,
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette15, NULL,
CMAP_PALETTED_TRUECOLOR |
CMAP_RELOAD_ON_MODE_SWITCH))
return FALSE;
} else {
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette16, 0,
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette16, NULL,
CMAP_PALETTED_TRUECOLOR |
CMAP_RELOAD_ON_MODE_SWITCH))
return FALSE;
}
} else {
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette24, 0,
if (!xf86HandleColormaps(pScreen, 256, 8, I810LoadPalette24, NULL,
CMAP_PALETTED_TRUECOLOR |
CMAP_RELOAD_ON_MODE_SWITCH))
return FALSE;
@ -2535,19 +2535,19 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
if (pI810->ScanlineColorExpandBuffers) {
xfree(pI810->ScanlineColorExpandBuffers);
pI810->ScanlineColorExpandBuffers = 0;
pI810->ScanlineColorExpandBuffers = NULL;
}
if (infoPtr) {
if (infoPtr->ScanlineColorExpandBuffers)
xfree(infoPtr->ScanlineColorExpandBuffers);
XAADestroyInfoRec(infoPtr);
pI810->AccelInfoRec = 0;
pI810->AccelInfoRec = NULL;
}
if (pI810->CursorInfoRec) {
xf86DestroyCursorInfoRec(pI810->CursorInfoRec);
pI810->CursorInfoRec = 0;
pI810->CursorInfoRec = NULL;
}
/* Free all allocated video ram.

View File

@ -555,7 +555,7 @@ I830UnmapMMIO(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI830->MMIOBase,
I810_REG_SIZE);
pI830->MMIOBase = 0;
pI830->MMIOBase = NULL;
}
static Bool
@ -565,7 +565,7 @@ I830UnmapMem(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI830->FbBase,
pI830->FbMapSize);
pI830->FbBase = 0;
pI830->FbBase = NULL;
I830UnmapMMIO(pScrn);
return TRUE;
}
@ -903,7 +903,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
} else
pI830->entityPrivate = NULL;
if (xf86RegisterResources(pI830->pEnt->index, 0, ResNone)) {
if (xf86RegisterResources(pI830->pEnt->index, NULL, ResNone)) {
PreInitCleanup(pScrn);
return FALSE;
}
@ -2568,7 +2568,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
}
fbPictureInit(pScreen, 0, 0);
fbPictureInit(pScreen, NULL, 0);
xf86SetBlackWhitePixels(pScreen);
@ -2605,7 +2605,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
DPRINTF(PFX, "assert( if(!xf86HandleColormaps(pScreen, ...)) )\n");
if (!xf86HandleColormaps(pScreen, 256, 8, I830LoadPalette, 0,
if (!xf86HandleColormaps(pScreen, 256, 8, I830LoadPalette, NULL,
CMAP_RELOAD_ON_MODE_SWITCH |
CMAP_PALETTED_TRUECOLOR)) {
return FALSE;
@ -2962,7 +2962,7 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
if (pI830->ScanlineColorExpandBuffers) {
xfree(pI830->ScanlineColorExpandBuffers);
pI830->ScanlineColorExpandBuffers = 0;
pI830->ScanlineColorExpandBuffers = NULL;
}
#ifdef I830_USE_XAA
if (infoPtr) {