Skip to content

Commit

Permalink
target: Eliminate else using boolean logic
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Andy Grover authored and Nicholas Bellinger committed Jul 17, 2012
1 parent 617a0c2 commit cdf88a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/target/target_core_tpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,8 @@ struct se_node_acl *core_tpg_check_initiator_node_acl(
* TPG LUNs if the fabric is not explictly asking for
* tpg_check_demo_mode_login_only() == 1.
*/
if ((tpg->se_tpg_tfo->tpg_check_demo_mode_login_only != NULL) &&
(tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg) == 1))
do { ; } while (0);
else
if ((tpg->se_tpg_tfo->tpg_check_demo_mode_login_only == NULL) ||
(tpg->se_tpg_tfo->tpg_check_demo_mode_login_only(tpg) != 1))
core_tpg_add_node_to_devs(acl, tpg);

spin_lock_irq(&tpg->acl_node_lock);
Expand Down

0 comments on commit cdf88a2

Please sign in to comment.