code review fixes

This commit is contained in:
Josh Poimboeuf 2014-09-15 21:11:13 -05:00
parent 1ee3ae669f
commit a20940892a
1 changed files with 5 additions and 3 deletions

View File

@ -1552,24 +1552,26 @@ int fixup_group_size(struct kpatch_elf *kelf, int offset)
/* find beginning of this group */
found = 0;
list_for_each_entry(rela, &sec->relas, list)
list_for_each_entry(rela, &sec->relas, list) {
if (!strcmp(rela->sym->name, ".fixup") &&
rela->addend == offset) {
found = 1;
break;
}
}
}
if (!found)
ERROR("can't find .fixup rela group at offset %d\n", offset);
/* find beginning of next group */
found = 0;
list_for_each_entry_continue(rela, &sec->relas, list)
list_for_each_entry_continue(rela, &sec->relas, list) {
if (!strcmp(rela->sym->name, ".fixup") &&
rela->addend > offset) {
found = 1;
break;
}
}
if (!found) {
/* last group */