[SCSI] zfcp: NULL vs 0 usage
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 18 Jul 2007 08:55:10 +0000 (10:55 +0200)
committerJames Bottomley <jejb@mulgrave.localdomain>
Wed, 18 Jul 2007 16:32:53 +0000 (11:32 -0500)
Get rid of two 'warning: Using plain integer as NULL pointer'.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_fsf.c

index a1db95925138c959cfe5894668289b281fee6a21..c95ab23b29609be44213d8e4cf046cda14e1a3dc 100644 (file)
@@ -1526,15 +1526,12 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool)
  * zfcp_gid_pn_buffers_free - free buffers for GID_PN nameserver request
  * @gid_pn: pointer to struct zfcp_gid_pn_data which has to be freed
  */
-static void
-zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
+static void zfcp_gid_pn_buffers_free(struct zfcp_gid_pn_data *gid_pn)
 {
-        if ((gid_pn->ct.pool != 0))
+       if (gid_pn->ct.pool)
                mempool_free(gid_pn, gid_pn->ct.pool);
        else
-                kfree(gid_pn);
-
-       return;
+               kfree(gid_pn);
 }
 
 /**
index 0eb31e162b159604b5e6d7cfca9c4e646486b062..b240800b78d7af56c31dbbf2a187b26506453fd6 100644 (file)
@@ -1930,7 +1930,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
 skip_fsfstatus:
        send_els->status = retval;
 
-       if (send_els->handler != 0)
+       if (send_els->handler)
                send_els->handler(send_els->handler_data);
 
        return retval;