diff options
author | Nick Clifton <nickc@redhat.com> | 2001-08-31 16:16:14 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-08-31 16:16:14 +0000 |
commit | 3c4671d518eccfe7874a7cbe0ce8f9d0af16802e (patch) | |
tree | eb6394d0eef22c4ce2bb984d31e5c57020a415a2 /bfd/elflink.h | |
parent | 8d981b2544a3f3b5fafd90e6c81538d8f98049a5 (diff) | |
download | gdb-3c4671d518eccfe7874a7cbe0ce8f9d0af16802e.tar.gz |
Fix off-by-one error whilst sweeping vtable relocs
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r-- | bfd/elflink.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index c2bcc45c368..0da2f0e76ea 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -7101,10 +7101,12 @@ elf_gc_propagate_vtable_entries_used (h, okp) int file_align = bed->s->file_align; n = h->vtable_parent->vtable_entries_size / file_align; - while (--n != 0) + while (n--) { - if (*pu) *cu = true; - pu++, cu++; + if (*pu) + *cu = true; + pu++; + cu++; } } } |