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-next>] [day] [month] [year] [list]
Date:   Fri, 14 Jul 2023 14:26:08 +0800
From:   liubin001@...suo.com
To:     djwong@...nel.org
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] xfs:Comparisons should place the constant on the right side
 of the test The if statement uses an assignment statement as a condition, 
 which is confusing.

xfs:The if statement uses an assignment statement as a condition, which 
is confusing.
Signed-off-by: Liu Bin <liubin001@...suo.com>
---
  fs/xfs/xfs_trans_dquot.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index aa00cf67ad72..b429e95e425a 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -361,7 +361,8 @@ xfs_trans_apply_dquot_deltas(
               * The array of dquots is filled
               * sequentially, not sparsely.
               */
-            if ((dqp = qtrx->qt_dquot) == NULL)
+            dqp = qtrx->qt_dquot;
+            if (dqp == NULL)
                  break;

              ASSERT(XFS_DQ_IS_LOCKED(dqp));
@@ -492,8 +493,10 @@ xfs_trans_unreserve_and_mod_dquots(
              /*
               * We assume that the array of dquots is filled
               * sequentially, not sparsely.
+             *
               */
-            if ((dqp = qtrx->qt_dquot) == NULL)
+            dqp = qtrx->qt_dquot
+            if (dqp == NULL)
                  break;
              /*
               * Unreserve the original reservation. We don't care

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ