Fix a few more places where NULL was used instead of 0.

This commit is contained in:
se 2003-12-23 14:38:42 +00:00
parent fc90128bf7
commit 79e51fd0d7
2 changed files with 3 additions and 3 deletions

View File

@ -263,7 +263,7 @@ static void DRM(cleanup_buf_error)(drm_device_t *dev, drm_buf_entry_t *entry)
#if __HAVE_PCI_DMA
if (entry->seg_count) {
for (i = 0; i < entry->seg_count; i++) {
if (entry->seglist[i] != NULL)
if (entry->seglist[i] != 0)
DRM(pci_free)(dev, entry->buf_size,
(void *)entry->seglist[i],
entry->seglist_bus[i]);
@ -483,7 +483,7 @@ static int DRM(addbufs_pci)(drm_device_t *dev, drm_buf_desc_t *request)
while ( entry->buf_count < count ) {
vaddr = (vm_offset_t) DRM(pci_alloc)(dev, size, alignment,
0xfffffffful, &bus_addr);
if (vaddr == NULL) {
if (vaddr == 0) {
/* Set count correctly so we free the proper amount. */
entry->buf_count = count;
entry->seg_count = count;

View File

@ -75,7 +75,7 @@ void DRM(dma_takedown)(drm_device_t *dev)
dma->bufs[i].buf_count,
dma->bufs[i].seg_count);
for (j = 0; j < dma->bufs[i].seg_count; j++) {
if (dma->bufs[i].seglist[j] != NULL)
if (dma->bufs[i].seglist[j] != 0)
DRM(pci_free)(dev, dma->bufs[i].buf_size,
(void *)dma->bufs[i].seglist[j],
dma->bufs[i].seglist_bus[j]);