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: <20250902132359.83059-3-liaoyuanhong@vivo.com>
Date: Tue,  2 Sep 2025 21:23:42 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Damien Le Moal <dlemoal@...nel.org>,
	Bart Van Assche <bvanassche@....org>,
	Geoff Levand <geoff@...radead.org>,
	Prateek Singh Rathore <prateek.singh.rathore@...il.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	linux-scsi@...r.kernel.org (open list:SCSI SUBSYSTEM),
	linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH 2/6] scsi: csiostor: Remove redundant ternary operators

Remove redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
---
 drivers/scsi/csiostor/csio_scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 34bde6650fae..a95a7ccdb3a9 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -1407,7 +1407,7 @@ csio_disable_port(struct device *dev,
 	bool disable;
 
 	if (*buf == '1' || *buf == '0')
-		disable = (*buf == '1') ? true : false;
+		disable = *buf == '1';
 	else
 		return -EINVAL;
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ