diff options
author | Arkadiusz Miskiewicz <arekm@maven.pl> | 2007-12-11 23:53:03 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-12-11 23:53:03 -0500 |
commit | 9e5efdecd12092031a4aebce58747cb4a6f48f28 (patch) | |
tree | 7bbedb07924073099129f4499cb3b686cf92f692 | |
parent | f3d2ec3a5ae61215c792018320158750e7aa937c (diff) |
sparse fixes and cleanups from arekm
-rw-r--r-- | src/r128_dri.c | 6 | ||||
-rw-r--r-- | src/r128_probe.c | 2 | ||||
-rw-r--r-- | src/radeon_bios.c | 7 | ||||
-rw-r--r-- | src/radeon_crtc.c | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/src/r128_dri.c b/src/r128_dri.c index fc91421d..edb77bac 100644 --- a/src/r128_dri.c +++ b/src/r128_dri.c @@ -80,9 +80,9 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; R128InfoPtr info = R128PTR(pScrn); int numConfigs = 0; - __GLXvisualConfig *pConfigs = 0; - R128ConfigPrivPtr pR128Configs = 0; - R128ConfigPrivPtr *pR128ConfigPtrs = 0; + __GLXvisualConfig *pConfigs = NULL; + R128ConfigPrivPtr pR128Configs = NULL; + R128ConfigPrivPtr *pR128ConfigPtrs = NULL; int i, accum, stencil, db; switch (info->CurrentLayout.pixel_code) { diff --git a/src/r128_probe.c b/src/r128_probe.c index b2298dff..0be21e8a 100644 --- a/src/r128_probe.c +++ b/src/r128_probe.c @@ -193,7 +193,7 @@ R128Probe(DriverPtr drv, int flags) pScrn = NULL; if((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i], - R128PciChipsets, 0, 0, 0, 0, 0))) + R128PciChipsets, NULL, NULL, NULL, NULL, NULL))) { pScrn->driverVersion = R128_VERSION_CURRENT; pScrn->driverName = R128_DRIVER_NAME; diff --git a/src/radeon_bios.c b/src/radeon_bios.c index bc908b56..d150c4bc 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -48,13 +48,12 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) int tmp; unsigned short dptr; - if (!(info->VBIOS = xalloc( #ifdef XSERVER_LIBPCIACCESS - info->PciInfo->rom_size + info->VBIOS = xalloc(info->PciInfo->rom_size); #else - RADEON_VBIOS_SIZE + info->VBIOS = xalloc(RADEON_VBIOS_SIZE); #endif - ))) { + if (!info->VBIOS) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot allocate space for hold Video BIOS!\n"); return FALSE; diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index 8984428a..2023f40a 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -637,7 +637,7 @@ RADEONComputePLL(RADEONPLLPtr pll, CARD32 best_error = 0xffffffff; CARD32 best_vco_diff = 1; - ErrorF("freq: %d\n", freq); + ErrorF("freq: %lu\n", freq); for (i = 0; post_divs[i]; i++) { int post_div = post_divs[i]; |