git: 55fa60782f3e - stable/13 - rb_tree: resolve name clash
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Aug 2022 09:22:21 UTC
The branch stable/13 has been updated by dougm:
URL: https://cgit.FreeBSD.org/src/commit/?id=55fa60782f3e0f63ea572e80b269acf6ad3dc8e3
commit 55fa60782f3e0f63ea572e80b269acf6ad3dc8e3
Author: Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2022-08-02 16:47:17 +0000
Commit: Doug Moore <dougm@FreeBSD.org>
CommitDate: 2022-08-22 09:22:04 +0000
rb_tree: resolve name clash
Rename 'tmp' to 'rb_update_tmp' in a macro to avoid a shadow variable panic.
Reported by: imb@protected-networks.net
Fixes: 35557a0d9169
(cherry picked from commit b3fd5464a903180994313bd903f3c170f5f9e1f3)
---
sys/sys/tree.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index b66fa88829b2..2baadf768340 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -372,10 +372,10 @@ struct { \
#endif
#define RB_UPDATE_AUGMENT(elm, field) do { \
- __typeof(elm) tmp = (elm); \
+ __typeof(elm) rb_update_tmp = (elm); \
do { \
- RB_AUGMENT(tmp); \
- } while ((tmp = RB_PARENT(tmp, field)) != NULL); \
+ RB_AUGMENT(rb_update_tmp); \
+ } while ((rb_update_tmp = RB_PARENT(rb_update_tmp, field)) != NULL); \
} while (0)
#define RB_SWAP_CHILD(head, out, in, field) do { \