-----Original Message-----
From: <[email protected]> on behalf of Doug Moore
<[email protected]>
Date: 2022-08-02, Tuesday at 09:49
To: <[email protected]>, <[email protected]>,
<[email protected]>
Subject: git: b3fd5464a903 - main - rb_tree: resolve name clash
The branch main has been updated by dougm:
URL:
https://cgit.FreeBSD.org/src/commit/?id=b3fd5464a903180994313bd903f3c170f5f9e1f3
commit b3fd5464a903180994313bd903f3c170f5f9e1f3
Author: Doug Moore <[email protected]>
AuthorDate: 2022-08-02 16:47:17 +0000
Commit: Doug Moore <[email protected]>
CommitDate: 2022-08-02 16:47:17 +0000
rb_tree: resolve name clash
Rename 'tmp' to 'rb_update_tmp' in a macro to avoid a shadow variable
panic.
I was going to suggest '_tmp', because macro-local variables are supposed to
have leading underscores, right?
Thanks,
Ravi (rpokala@)
Reported by: [email protected]
Fixes: 35557a0d9169
---
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 c0d21b5f8b73..45791e08c947 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 { \