From: Jordan Justen Date: Wed, 6 Jan 2016 23:42:18 +0000 (-0800) Subject: isl: Assert that alignments are not 0 for isl_align X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f0a10149c6e5ea7f2c5ddfa13f71011db0ef420;p=mesa.git isl: Assert that alignments are not 0 for isl_align Signed-off-by: Jordan Justen --- diff --git a/src/isl/isl_priv.h b/src/isl/isl_priv.h index 1c9343a7d1f..b399e0f8116 100644 --- a/src/isl/isl_priv.h +++ b/src/isl/isl_priv.h @@ -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); }