From 3ae9425c253f6a606e244f44e83fff027c6a52e5 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 12 Sep 2012 12:22:11 +0200 Subject: [PATCH] isl_map_plain_is_disjoint: fix error handling Signed-off-by: Sven Verdoolaege --- isl_map_simplify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/isl_map_simplify.c b/isl_map_simplify.c index 9cebefb8..9001833d 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -2170,12 +2170,14 @@ int isl_map_plain_is_disjoint(__isl_keep isl_map *map1, __isl_keep isl_map *map2) { int i, j; + int intersect; if (!map1 || !map2) return -1; - if (isl_map_plain_is_equal(map1, map2)) - return 0; + intersect = isl_map_plain_is_equal(map1, map2); + if (intersect < 0 || intersect) + return intersect < 0 ? -1 : 0; for (i = 0; i < map1->n; ++i) { for (j = 0; j < map2->n; ++j) { -- 2.11.4.GIT