isl_mat_drop_cols: special case dropping of zero columns
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 20 Mar 2013 09:17:34 +0000 (10:17 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 20 Mar 2013 09:17:34 +0000 (10:17 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_mat.c

index cff8123..16a79f7 100644 (file)
--- a/isl_mat.c
+++ b/isl_mat.c
@@ -1245,6 +1245,9 @@ struct isl_mat *isl_mat_drop_cols(struct isl_mat *mat, unsigned col, unsigned n)
 {
        int r;
 
+       if (n == 0)
+               return mat;
+
        mat = isl_mat_cow(mat);
        if (!mat)
                return NULL;