isl: Assert that alignments are not 0 for isl_align
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 6 Jan 2016 23:42:18 +0000 (15:42 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 7 Jan 2016 18:37:35 +0000 (10:37 -0800)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
src/isl/isl_priv.h

index 1c9343a7d1f943cee9045d39340cad767d497828..b399e0f811603aace8902ebc4b25f86da6b9e5bf 100644 (file)
@@ -67,7 +67,7 @@ isl_is_aligned(uintmax_t n, uintmax_t a)
 static inline uintmax_t
 isl_align(uintmax_t n, uintmax_t a)
 {
-   assert(isl_is_pow2(a));
+   assert(a != 0 && isl_is_pow2(a));
    return (n + a - 1) & ~(a - 1);
 }