Commit a8e2470b authored by Nicolas Denoyelle's avatar Nicolas Denoyelle

check return value when output arg is NULL

parent e1ae2782
...@@ -183,7 +183,8 @@ int tleaf_it_rank(const excit_t it, const ssize_t *indexes, ssize_t *n) ...@@ -183,7 +183,8 @@ int tleaf_it_rank(const excit_t it, const ssize_t *indexes, ssize_t *n)
acc *= data_it->arities[i]; acc *= data_it->arities[i];
} }
*n = val; if (n != NULL)
*n = val;
return EXCIT_SUCCESS; return EXCIT_SUCCESS;
} }
...@@ -377,6 +378,8 @@ int tleaf_it_split(const excit_t it, const ssize_t depth, ...@@ -377,6 +378,8 @@ int tleaf_it_split(const excit_t it, const ssize_t depth,
if (data_it->arities[depth] % n != 0) if (data_it->arities[depth] % n != 0)
return -EXCIT_EINVAL; return -EXCIT_EINVAL;
if (out == NULL)
return EXCIT_SUCCESS;
int err; int err;
excit_t *levels, *levels_inverse; excit_t *levels, *levels_inverse;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment