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]
Message-Id: <20230418145712.20620-1-r09921093@g.ntu.edu.tw>
Date:   Tue, 18 Apr 2023 22:57:12 +0800
From:   Lin Chun Yeh <r09921093@...tu.edu.tw>
To:     linux-kernel@...r.kernel.org
Cc:     Lin Chun Yeh <r09921093@...tu.edu.tw>
Subject: [PATCH] include/linux/rbtree.h: move the declaration of c in rb_find_add()

Move the declaration position of variable c in rb_find_add() to
maintain thedeclaration and used scope consistent with the c
variables, which have the same usage in rb_find() and
rb_find_first().

Signed-off-by: Lin Chun Yeh <r09921093@...tu.edu.tw>
---
 include/linux/rbtree.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index f7edca369..910c12382 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -225,11 +225,10 @@ rb_find_add(struct rb_node *node, struct rb_root *tree,
 {
 	struct rb_node **link = &tree->rb_node;
 	struct rb_node *parent = NULL;
-	int c;
 
 	while (*link) {
 		parent = *link;
-		c = cmp(node, parent);
+		int c = cmp(node, parent);
 
 		if (c < 0)
 			link = &parent->rb_left;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ