Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24 /init/do_mounts_rd.c

Filename:/init/do_mounts_rd.c
Lines Added:3
Lines Deleted:3
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4  2.6.24-rc3 
(Following) 2.6.25-git13  2.6.25-git14  2.6.25-git15  2.6.25-git16  2.6.25-git17  2.6.25-git18 

Location
[  2.6.24
  [  init
     o  do_mounts_rd.c

Patch

diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ed652f4..3ac5904 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -57,7 +57,7 @@ identify_ramdisk_image(int fd, int start_block)
    unsigned char *buf;
 
    buf = kmalloc(size, GFP_KERNEL);
-   if (buf == 0)
+   if (!buf)
       return -1;
 
    minixsb = (struct minix_super_block *) buf;
@@ -407,12 +407,12 @@ static int __init crd_load(int in_fd, int out_fd)
    crd_infd = in_fd;
    crd_outfd = out_fd;
    inbuf = kmalloc(INBUFSIZ, GFP_KERNEL);
-   if (inbuf == 0) {
+   if (!inbuf) {
       printk(KERN_ERR "RAMDISK: Couldn't allocate gzip buffer\n");
       return -1;
    }
    window = kmalloc(WSIZE, GFP_KERNEL);
-   if (window == 0) {
+   if (!window) {
       printk(KERN_ERR "RAMDISK: Couldn't allocate gzip window\n");
       kfree(inbuf);
       return -1;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.