]> err.no Git - linux-2.6/commitdiff
init: fix integer as NULL pointer warnings
authorHarvey Harrison <harvey.harrison@gmail.com>
Mon, 28 Apr 2008 21:13:14 +0000 (14:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 00:29:18 +0000 (17:29 -0700)
init/do_mounts_rd.c:215:13: warning: Using plain integer as NULL pointer
init/do_mounts_md.c:136:45: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/do_mounts_md.c
init/do_mounts_rd.c

index 753dc54a664972ff0ae441ab8945c1345d563c2a..7473b0c59d4dd11c438bd4808c0044caba4e7a33 100644 (file)
@@ -133,7 +133,7 @@ static void __init md_setup_drive(void)
                else
                        dev = MKDEV(MD_MAJOR, minor);
                create_dev(name, dev);
-               for (i = 0; i < MD_SB_DISKS && devname != 0; i++) {
+               for (i = 0; i < MD_SB_DISKS && devname != NULL; i++) {
                        char *p;
                        char comp_name[64];
                        u32 rdev;
index 3ac5904d1b124c1584b0308b0c42712d9a86cc20..46dfd64ae8fb027cf74e1252b91b2919f81a1923 100644 (file)
@@ -212,7 +212,7 @@ int __init rd_load_image(char *from)
        }
 
        buf = kmalloc(BLOCK_SIZE, GFP_KERNEL);
-       if (buf == 0) {
+       if (!buf) {
                printk(KERN_ERR "RAMDISK: could not allocate buffer\n");
                goto done;
        }