cleanup logic in rela comparison

Per review comments.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
This commit is contained in:
Seth Jennings 2014-05-12 08:48:33 -05:00
parent 207c237e48
commit a78bb8bcb3
1 changed files with 3 additions and 4 deletions

View File

@ -460,13 +460,12 @@ void kpatch_compare_correlated_rela_section(struct section *sec)
{
struct rela *rela1, *rela2 = NULL;
list_for_each_entry(rela1, &sec->relas, list) {
if (rela2)
rela2 = list_entry(rela2->list.next, struct rela, list);
else
rela2 = list_entry(sec->twin->relas.next, struct rela, list);
if (rela_equal(rela1, rela2))
list_for_each_entry(rela1, &sec->relas, list) {
if (rela_equal(rela1, rela2)) {
rela2 = list_entry(rela2->list.next, struct rela, list);
continue;
}
sec->status = CHANGED;
return;
}