Skip to content

Commit

Permalink
[SCSI] iscsi_tcp: change & to &&
Browse files Browse the repository at this point in the history
This change is basically a clean up.

datadgst_en is an int which comes from the user.  I didn't see anything
limiting it to 1 and 0 although obviously that's what it's supposed to
be.  If the user passed in 2 this test would fail.

This same if condition is repeated in another function and it uses &&
there.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed Apr 11, 2010
1 parent 9f8f3aa commit ef7d17a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/libiscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ iscsi_tcp_data_recv_prep(struct iscsi_tcp_conn *tcp_conn)
struct iscsi_conn *conn = tcp_conn->iscsi_conn;
struct hash_desc *rx_hash = NULL;

if (conn->datadgst_en &
if (conn->datadgst_en &&
!(conn->session->tt->caps & CAP_DIGEST_OFFLOAD))
rx_hash = tcp_conn->rx_hash;

Expand Down

0 comments on commit ef7d17a

Please sign in to comment.