From 07cf5e565fd4763a17ad339bb4ca58a80d5c2c16 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 30 Apr 2018 10:31:44 +0200 Subject: [PATCH] isl_space_align_params: improve error handling Signed-off-by: Sven Verdoolaege --- isl_space.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/isl_space.c b/isl_space.c index 96f69d32..8d52c29a 100644 --- a/isl_space.c +++ b/isl_space.c @@ -2558,11 +2558,9 @@ __isl_give isl_space *isl_space_align_params(__isl_take isl_space *space1, { isl_reordering *exp; - if (!isl_space_has_named_params(space1) || - !isl_space_has_named_params(space2)) - isl_die(isl_space_get_ctx(space1), isl_error_invalid, - "parameter alignment requires named parameters", - goto error); + if (isl_space_check_named_params(space1) < 0 || + isl_space_check_named_params(space2) < 0) + goto error; space2 = isl_space_params(space2); exp = isl_parameter_alignment_reordering(space1, space2); -- 2.11.4.GIT