linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] Renames variable to fix shadow warning.
@ 2018-10-17  0:08 Leonardo Brás
  2018-10-17  2:56 ` [Lkcamp] " Helen Koike
  2018-10-17  6:01 ` Ingo Molnar
  0 siblings, 2 replies; 8+ messages in thread
From: Leonardo Brás @ 2018-10-17  0:08 UTC (permalink / raw)
  To: lkcamp
  Cc: Matthew Wilcox, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H. Peter Anvin, x86, Masahiro Yamada,
	Michal Marek, linux-kernel, linux-kbuild

Renames the char variable to avoid shadowing a variable previously
declared on this function.

Signed-off-by: Leonardo Brás <leobras.c@gmail.com>
---
 arch/x86/entry/vdso/vdso2c.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index fa847a620f40..9466998d0f28 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/entry/vdso/vdso2c.h
@@ -93,11 +93,11 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
 		int k;
 		ELF(Sym) *sym = raw_addr + GET_LE(&symtab_hdr->sh_offset) +
 			GET_LE(&symtab_hdr->sh_entsize) * i;
-		const char *name = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
+		const char *name2 = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
 			GET_LE(&sym->st_name);
 
 		for (k = 0; k < NSYMS; k++) {
-			if (!strcmp(name, required_syms[k].name)) {
+			if (!strcmp(name2, required_syms[k].name)) {
 				if (syms[k]) {
 					fail("duplicate symbol %s\n",
 					     required_syms[k].name);
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-18  5:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17  0:08 [PATCH 2/4] Renames variable to fix shadow warning Leonardo Brás
2018-10-17  2:56 ` [Lkcamp] " Helen Koike
2018-10-17 23:10   ` Leonardo Bras
2018-10-17  6:01 ` Ingo Molnar
2018-10-17 17:54   ` Andy Lutomirski
2018-10-17 23:16     ` Leonardo Bras
2018-10-17 23:12   ` Leonardo Bras
2018-10-18  5:47     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).