X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_space.c;h=499dd1a2958ab14821f5a79ea2b34dbdd3ccedcb;hb=da1dc20cb7aa4509e375f703c35beaf27dfa4a15;hp=bd7d15c7c3ba2005abe56ca7ab2dfb4fe0e0c9a7;hpb=e98192b2942cdf66379eb10dd6ec99d3d82df1f4;p=platform%2Fupstream%2Fisl.git diff --git a/isl_space.c b/isl_space.c index bd7d15c..499dd1a 100644 --- a/isl_space.c +++ b/isl_space.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -783,6 +784,8 @@ __isl_give isl_space *isl_space_extend(__isl_take isl_space *dim, isl_assert(dim->ctx, dim->n_out <= n_out, goto error); dim = isl_space_cow(dim); + if (!dim) + goto error; if (dim->ids) { ids = isl_calloc_array(dim->ctx, isl_id *, @@ -1547,9 +1550,9 @@ static uint32_t isl_hash_dim(uint32_t hash, __isl_keep isl_space *dim) if (!dim) return hash; - hash = isl_hash_builtin(hash, dim->nparam); - hash = isl_hash_builtin(hash, dim->n_in); - hash = isl_hash_builtin(hash, dim->n_out); + isl_hash_byte(hash, dim->nparam % 256); + isl_hash_byte(hash, dim->n_in % 256); + isl_hash_byte(hash, dim->n_out % 256); for (i = 0; i < dim->nparam; ++i) { id = get_id(dim, isl_dim_param, i);