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: <20190309183047.10781-6-gui.maeoka@gmail.com>
Date:   Sat,  9 Mar 2019 15:30:47 -0300
From:   Guilherme Tadashi Maeoka <gui.maeoka@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Guilherme Tadashi Maeoka <gui.maeoka@...il.com>
Subject: [PATCH 5/5] Staging: rtl8723bs: os_dep: Set constant on right side

Place a constant on the right side of the test.

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@...il.com>
---
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index 262b70e88e67..2ad28d903ef8 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -109,7 +109,7 @@ static int readFile(struct file *fp, char *buf, int len)
 		rlen = fp->f_op->read(fp, (char __force __user *)buf+sum, len-sum, &fp->f_pos);
 		if (rlen > 0)
 			sum += rlen;
-		else if (0 != rlen)
+		else if (rlen != 0)
 			return rlen;
 		else
 			break;
@@ -137,7 +137,7 @@ static int isFileReadable(char *path)
 	} else {
 		oldfs = get_fs(); set_fs(KERNEL_DS);
 
-		if (1 != readFile(fp, &buf, 1))
+		if (readFile(fp, &buf, 1) != 1)
 			ret = -EINVAL;
 
 		set_fs(oldfs);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ