From fca189152a476de331fbb5997f540d8bc4f34599 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 8 Oct 2014 11:16:09 -0500 Subject: [PATCH] fix review comment --- kpatch-build/create-diff-object.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index 9b68605..53191fb 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -721,16 +721,15 @@ static int kpatch_warn_only_change(struct section *sec) */ found = 0; list_for_each_entry(rela, &sec->rela->relas, list) { - if (rela->offset >= offset + length) { - if (rela->string) - continue; - if (!strncmp(rela->sym->name, - "warn_slowpath_", 14)) { - found = 1; - break; - } - return 0; + if (rela->offset < offset + length) + continue; + if (rela->string) + continue; + if (!strncmp(rela->sym->name, "warn_slowpath_", 14)) { + found = 1; + break; } + return 0; } if (!found) return 0;