From: Michael S. Tsirkin Date: Sun, 11 Mar 2007 08:08:40 +0000 (+0200) Subject: Fixed warnings that were reported by sparse. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fd2d24eb2e9c2b70d3402d29d0ab1ac5c612425f;p=~adrianc%2Fmstflint.git Fixed warnings that were reported by sparse. Signed-off-by: Dotan Barak Signed-off-by: Michael S. Tsirkin --- diff --git a/mtcr.h b/mtcr.h index 9215668..07fc17d 100644 --- 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