dect
/
linux-2.6
Archived
13
0
Fork 0

FDPIC: For-loop in elf_core_vma_data_size() is incorrect

Fix an incorrect for-loop in elf_core_vma_data_size().  The advance-pointer
statement lacks an assignment:

	  CC      fs/binfmt_elf_fdpic.o
	fs/binfmt_elf_fdpic.c: In function 'elf_core_vma_data_size':
	fs/binfmt_elf_fdpic.c:1593: warning: statement with no effect

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
David Howells 2010-03-24 17:02:28 +00:00 committed by Linus Torvalds
parent 6467a71c56
commit 47568d4c56
1 changed files with 1 additions and 1 deletions

View File

@ -1590,7 +1590,7 @@ static size_t elf_core_vma_data_size(unsigned long mm_flags)
struct vm_area_struct *vma;
size_t size = 0;
for (vma = current->mm->mmap; vma; vma->vm_next)
for (vma = current->mm->mmap; vma; vma = vma->vm_next)
if (maydump(vma, mm_flags))
size += vma->vm_end - vma->vm_start;
return size;