lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09a6b5ba-70b7-ba4d-ad4f-6450c9da6208@users.sourceforge.net>
Date:   Sat, 4 Nov 2017 14:16:36 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
        "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 2/4] target: Combine two condition checks into one statement
 in target_xcopy_do_work()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 4 Nov 2017 13:26:46 +0100

The same label was used by goto statements after two condition checks.
Thus use a single statement instead.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/target/target_core_xcopy.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
index b06877c57765..46cac36014df 100644
--- a/drivers/target/target_core_xcopy.c
+++ b/drivers/target/target_core_xcopy.c
@@ -802,10 +802,8 @@ static void target_xcopy_do_work(struct work_struct *work)
 	int rc = 0;
 	unsigned short nolb, cur_nolb, max_nolb, copied_nolb = 0;
 
-	if (target_parse_xcopy_cmd(xop) != TCM_NO_SENSE)
-		goto err_free_xop;
-
-	if (WARN_ON_ONCE(!xop->src_dev) || WARN_ON_ONCE(!xop->dst_dev))
+	if (target_parse_xcopy_cmd(xop) != TCM_NO_SENSE ||
+	    WARN_ON_ONCE(!xop->src_dev) || WARN_ON_ONCE(!xop->dst_dev))
 		goto err_free_xop;
 
 	src_dev = xop->src_dev;
-- 
2.15.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ