diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-02-10 14:05:27 +0000 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:30:23 +0100 |
commit | 9f7d6175e7f8af3cb8b3556affe04d49d35be663 (patch) | |
tree | ccfa305a26b01f5b198bcd8aff90ed581e30e22d | |
parent | 3bc7d096b61983c7b6d8334bf79b8bc64933fe6e (diff) |
Fix some integer range checks which always evaluate false
There are some integer range checks which always evaluate false
due to use of unsigned integer types. One of these would prevent
detection of encoding errors from celt. The others are simply
no-ops.
* common/pixman_utils.c: SpiceROP is an enum & thus unsigned
-rw-r--r-- | common/pixman_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/pixman_utils.c b/common/pixman_utils.c index f113cf5..d4020e6 100644 --- a/common/pixman_utils.c +++ b/common/pixman_utils.c @@ -304,7 +304,7 @@ void spice_pixman_fill_rect_rop(pixman_image_t *dest, spice_assert(height > 0); spice_assert(x + width <= pixman_image_get_width(dest)); spice_assert(y + height <= pixman_image_get_height(dest)); - spice_assert(rop >= 0 && rop < 16); + spice_assert(rop < 16); if (depth == 8) { solid_rop_8_func_t rop_func = solid_rops_8[rop]; @@ -455,7 +455,7 @@ void spice_pixman_tile_rect_rop(pixman_image_t *dest, spice_assert(height > 0); spice_assert(x + width <= pixman_image_get_width(dest)); spice_assert(y + height <= pixman_image_get_height(dest)); - spice_assert(rop >= 0 && rop < 16); + spice_assert(rop < 16); spice_assert(depth == spice_pixman_image_get_bpp(tile)); tile_start_x = (x - offset_x) % tile_width; |