diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-29 00:35:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-29 00:35:41 -0700 |
commit | 9893721cdf2953fdafd90988899307ec14794f4c (patch) | |
tree | 257e88d2751bc57fc6a07eca96011e6fd4eb1379 /mm | |
parent | 4d1ae8c58dd8a8505a7684fa393c95da04082ef7 (diff) | |
download | history-9893721cdf2953fdafd90988899307ec14794f4c.tar.gz |
sparse: fix pointer/integer confusion
I don't think we're in K&R any more, Toto.
If you want a NULL pointer, use NULL. Don't use an integer.
Most of the users really didn't seem to know the proper type.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 4 | ||||
-rw-r--r-- | mm/slab.c | 2 | ||||
-rw-r--r-- | mm/swapfile.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c index c511c41943f24b..0404594104a5f3 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -669,7 +669,7 @@ out: static inline struct page *get_page_map(struct page *page) { if (!pfn_valid(page_to_pfn(page))) - return 0; + return NULL; return page; } @@ -1805,7 +1805,7 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk) #ifdef AT_SYSINFO_EHDR return &gate_vma; #else - return 0; + return NULL; #endif } diff --git a/mm/slab.c b/mm/slab.c index 741f6461031f27..cad4d294972a63 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -474,7 +474,7 @@ struct cache_names { static struct cache_names __initdata cache_names[] = { #define CACHE(x) { .name = "size-" #x, .name_dma = "size-" #x "(DMA)" }, #include <linux/kmalloc_sizes.h> - { 0, } + { NULL, } #undef CACHE }; diff --git a/mm/swapfile.c b/mm/swapfile.c index ef4045b4204e3b..281a3fbc0d8949 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1293,7 +1293,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) int i, prev; int error; static int least_priority; - union swap_header *swap_header = 0; + union swap_header *swap_header = NULL; int swap_header_version; int nr_good_pages = 0; unsigned long maxpages = 1; |