]> git.openfabrics.org - ~adrianc/mstflint.git/commitdiff
Fixed warnings that were reported by sparse.
authorMichael S. Tsirkin <mst@mellanox.co.il>
Sun, 11 Mar 2007 08:08:40 +0000 (10:08 +0200)
committerMichael S. Tsirkin <mst@mellanox.co.il>
Sun, 11 Mar 2007 08:08:40 +0000 (10:08 +0200)
Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
mtcr.h

diff --git a/mtcr.h b/mtcr.h
index 92156687679b9d63855603c1d229d8d50f368ca6..07fc17d2b9ca6cdb95aea8c20077c8ff00197c9b 100644 (file)
--- a/mtcr.h
+++ b/mtcr.h
@@ -335,7 +335,7 @@ mfile *mopen(const char *name)
   char file_name[]="/proc/bus/pci/0000:00/00.0";
 
   mf=(mfile*)malloc(sizeof(mfile));
-  if (!mf) return 0;
+  if (!mf) return NULL;
 
   //If device name starts with /proc/bus/pci we'll use configuration cycles
   if (!strncmp(name,"/proc/bus/pci/",strlen("/proc/bus/pci/")))
@@ -449,7 +449,7 @@ open_failed:
 #if CONFIG_ENABLE_MMAP
 find_failed:
 #endif
-        return 0;
+        return NULL;
 }
 #endif