From fa938c1ec408d7cdafa2060c5b3f882a29e88afd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 20 Mar 2025 13:33:39 -0400 Subject: [PATCH] MT#55283 rename `table` Avoid shadow local variables Change-Id: I1abd646eae2c9a1690c41011fa5295718b4b5e1e --- kernel-module/xt_RTPENGINE.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 6ddfdab09..d4023a77a 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -579,7 +579,7 @@ static struct proc_dir_entry *my_proc_root; static struct proc_dir_entry *proc_list; static struct proc_dir_entry *proc_control; -static struct rtpengine_table *table[MAX_ID]; +static struct rtpengine_table *rtpe_table[MAX_ID]; static rwlock_t table_lock; static struct re_auto_array calls; @@ -952,7 +952,7 @@ static struct rtpengine_table *new_table_link(uint32_t id) { } write_lock_irqsave(&table_lock, flags); - if (table[id]) { + if (rtpe_table[id]) { write_unlock_irqrestore(&table_lock, flags); table_put(t); printk(KERN_WARNING "xt_RTPENGINE duplicate ID %u\n", id); @@ -960,7 +960,7 @@ static struct rtpengine_table *new_table_link(uint32_t id) { } ref_get(t); - table[id] = t; + rtpe_table[id] = t; t->id = id; write_unlock_irqrestore(&table_lock, flags); @@ -1256,7 +1256,7 @@ static int unlink_table(struct rtpengine_table *t) { DBG("Unlinking table %u\n", t->id); write_lock_irqsave(&table_lock, flags); - if (t->id >= MAX_ID || table[t->id] != t) { + if (t->id >= MAX_ID || rtpe_table[t->id] != t) { write_unlock_irqrestore(&table_lock, flags); return -EINVAL; } @@ -1264,7 +1264,7 @@ static int unlink_table(struct rtpengine_table *t) { write_unlock_irqrestore(&table_lock, flags); return -EBUSY; } - table[t->id] = NULL; + rtpe_table[t->id] = NULL; t->id = -1; write_unlock_irqrestore(&table_lock, flags); @@ -1294,7 +1294,7 @@ static struct rtpengine_table *get_table(unsigned int id) { return NULL; read_lock_irqsave(&table_lock, flags); - t = table[id]; + t = rtpe_table[id]; if (t) ref_get(t); read_unlock_irqrestore(&table_lock, flags);