Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2017 14:25:20 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r315953 - stable/11/sys/compat/linux
Message-ID:  <201703251425.v2PEPKo3024819@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Mar 25 14:25:20 2017
New Revision: 315953
URL: https://svnweb.freebsd.org/changeset/base/315953

Log:
  MFC r315278:
  
  Fix usage of the same 'i' variable in the external and nested loops.

Modified:
  stable/11/sys/compat/linux/linux_vdso.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_vdso.c
==============================================================================
--- stable/11/sys/compat/linux/linux_vdso.c	Sat Mar 25 14:14:11 2017	(r315952)
+++ stable/11/sys/compat/linux/linux_vdso.c	Sat Mar 25 14:25:20 2017	(r315953)
@@ -147,7 +147,7 @@ __elfN(linux_vdso_reloc)(struct sysentve
 	Elf_Shdr *shdr;
 	Elf_Dyn *dyn;
 	Elf_Sym *sym;
-	int i, symcnt;
+	int i, j, symcnt;
 
 	ehdr = (Elf_Ehdr *) sv->sv_sigcode;
 
@@ -205,7 +205,7 @@ __elfN(linux_vdso_reloc)(struct sysentve
 			sym = (Elf_Sym *)((caddr_t)ehdr + shdr[i].sh_offset);
 			symcnt = shdr[i].sh_size / sizeof(*sym);
 
-			for(i = 0; i < symcnt; i++, sym++) {
+			for(j = 0; j < symcnt; j++, sym++) {
 				if (sym->st_shndx == SHN_UNDEF ||
 				    sym->st_shndx == SHN_ABS)
 					continue;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703251425.v2PEPKo3024819>