diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-01-06 04:54:25 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-01-06 04:54:25 +0000 |
commit | fb7b802ddaa1440fdba829eff5373c7d9425f582 (patch) | |
tree | b3b069cab7bd5271fb133dbb3f750766e004bff9 | |
parent | 9fb6986e83a84f6b958e8aba2c20b5988676bd55 (diff) |
Fix some misuse of NULL where 0 is intended.
Obtained from: FreeBSD CVS
-rw-r--r-- | bsd-core/drm_bufs.c | 2 | ||||
-rw-r--r-- | bsd-core/drm_dma.c | 2 | ||||
-rw-r--r-- | bsd/drm_bufs.h | 2 | ||||
-rw-r--r-- | bsd/drm_dma.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c index 4bcd012a..a6d1c616 100644 --- a/bsd-core/drm_bufs.c +++ b/bsd-core/drm_bufs.c @@ -477,7 +477,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; diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c index 8d87c38a..4570a867 100644 --- a/bsd-core/drm_dma.c +++ b/bsd-core/drm_dma.c @@ -74,7 +74,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]); diff --git a/bsd/drm_bufs.h b/bsd/drm_bufs.h index 4bcd012a..a6d1c616 100644 --- a/bsd/drm_bufs.h +++ b/bsd/drm_bufs.h @@ -477,7 +477,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; diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h index 8d87c38a..4570a867 100644 --- a/bsd/drm_dma.h +++ b/bsd/drm_dma.h @@ -74,7 +74,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]); |