[CRIU] [PATCH 02/16] parasite: Cleanup get_vma_by_ip

Cyrill Gorcunov gorcunov at openvz.org
Mon Feb 13 14:26:25 EST 2012


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 parasite-syscall.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index 0cedc12..b2fc926 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -176,12 +176,12 @@ static struct vma_area *get_vma_by_ip(struct list_head *vma_area_list, unsigned
 	struct vma_area *vma_area;
 
 	list_for_each_entry(vma_area, vma_area_list, list) {
-		if (in_vma_area(vma_area, ip)) {
-			if (vma_area->vma.prot & PROT_EXEC) {
-				if (syscall_fits_vma_area(vma_area))
-					return vma_area;
-			}
-		}
+		if (!in_vma_area(vma_area, ip))
+			continue;
+		if (!(vma_area->vma.prot & PROT_EXEC))
+			continue;
+		if (syscall_fits_vma_area(vma_area))
+			return vma_area;
 	}
 
 	return NULL;
-- 
1.7.7.6



More information about the CRIU mailing list