summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-05-09 22:16:11 +0000
committerEric Anholt <anholt@freebsd.org>2004-05-09 22:16:11 +0000
commit51ed2f593703164b7bb7f9d0522f273f3f628c03 (patch)
tree903072b900c24c103078c00132da5b52d93780ac
parentd477cc007cacbf95d7db295f579e23fafb423f02 (diff)
Warning fixes.
-rw-r--r--bsd-core/drm_bufs.c2
-rw-r--r--bsd-core/drm_drv.c4
-rw-r--r--bsd/drm_bufs.h2
-rw-r--r--bsd/drm_drv.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index a6d1c616..d5beb3be 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -257,7 +257,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]);
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 02e34365..4fa785a8 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -78,10 +78,10 @@
#endif
#ifndef DRIVER_PREINIT
-#define DRIVER_PREINIT(dev) 0
+#define DRIVER_PREINIT(dev) do {} while (0)
#endif
#ifndef DRIVER_POSTINIT
-#define DRIVER_POSTINIT(dev) 0
+#define DRIVER_POSTINIT(dev) do {} while (0)
#endif
#ifndef DRIVER_PRERELEASE
#define DRIVER_PRERELEASE()
diff --git a/bsd/drm_bufs.h b/bsd/drm_bufs.h
index a6d1c616..d5beb3be 100644
--- a/bsd/drm_bufs.h
+++ b/bsd/drm_bufs.h
@@ -257,7 +257,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]);
diff --git a/bsd/drm_drv.h b/bsd/drm_drv.h
index 02e34365..4fa785a8 100644
--- a/bsd/drm_drv.h
+++ b/bsd/drm_drv.h
@@ -78,10 +78,10 @@
#endif
#ifndef DRIVER_PREINIT
-#define DRIVER_PREINIT(dev) 0
+#define DRIVER_PREINIT(dev) do {} while (0)
#endif
#ifndef DRIVER_POSTINIT
-#define DRIVER_POSTINIT(dev) 0
+#define DRIVER_POSTINIT(dev) do {} while (0)
#endif
#ifndef DRIVER_PRERELEASE
#define DRIVER_PRERELEASE()