staging: lustre: modified comparisons against NULL
authorMario Bambagini <mario.bambagini@gmail.com>
Tue, 28 Jul 2015 20:08:51 +0000 (22:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2015 22:57:35 +0000 (15:57 -0700)
The explicit comparisons against NULL has been modified to be shorter.

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_capa.c

index a3b3c46e08a3bc69f299ccd2831fc1b488c187f4..7768c6d8d1a883d2ecf02da21e62ee175221691e 100644 (file)
@@ -236,7 +236,7 @@ static int capa_thread_main(void *unused)
 
                        /* NB iput() is in ll_update_capa() */
                        inode = igrab(ocapa->u.cli.inode);
-                       if (inode == NULL) {
+                       if (!inode) {
                                DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
                                           "igrab failed for");
                                continue;
@@ -380,7 +380,7 @@ struct obd_capa *ll_mdscapa_get(struct inode *inode)
        struct ll_inode_info *lli = ll_i2info(inode);
        struct obd_capa *ocapa;
 
-       LASSERT(inode != NULL);
+       LASSERT(inode);
 
        if ((ll_i2sbi(inode)->ll_flags & LL_SBI_MDS_CAPA) == 0)
                return NULL;