提交 d613c3e2 编写于 作者: H Harvey Harrison 提交者: Linus Torvalds

init: fix integer as NULL pointer warnings

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: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9d04d928
...@@ -133,7 +133,7 @@ static void __init md_setup_drive(void) ...@@ -133,7 +133,7 @@ static void __init md_setup_drive(void)
else else
dev = MKDEV(MD_MAJOR, minor); dev = MKDEV(MD_MAJOR, minor);
create_dev(name, dev); 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 *p;
char comp_name[64]; char comp_name[64];
u32 rdev; u32 rdev;
......
...@@ -212,7 +212,7 @@ int __init rd_load_image(char *from) ...@@ -212,7 +212,7 @@ int __init rd_load_image(char *from)
} }
buf = kmalloc(BLOCK_SIZE, GFP_KERNEL); buf = kmalloc(BLOCK_SIZE, GFP_KERNEL);
if (buf == 0) { if (!buf) {
printk(KERN_ERR "RAMDISK: could not allocate buffer\n"); printk(KERN_ERR "RAMDISK: could not allocate buffer\n");
goto done; goto done;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册