pixman: Branch 'master'

Siarhei Siamashka siamashka at kemper.freedesktop.org
Wed Jan 19 16:14:36 PST 2011


 pixman/pixman-region.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit a8e4677ecc2fcbf16a53902e26fc82d0860e9a21
Author: Siarhei Siamashka <siarhei.siamashka at nokia.com>
Date:   Mon Jan 10 21:01:16 2011 +0200

    The code in 'bitmap_addrect' already assumes non-null 'reg->data'
    
    So the check of 'reg->data' pointer can be safely removed.

diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index 4e7c8db..142493b 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -2545,8 +2545,7 @@ bitmap_addrect (region_type_t *reg,
 	   ((r-1)->y1 == ry1) && ((r-1)->y2 == ry2) &&
 	   ((r-1)->x1 <= rx1) && ((r-1)->x2 >= rx2))))
     {
-	if (!reg->data ||
-	    reg->data->numRects == reg->data->size)
+	if (reg->data->numRects == reg->data->size)
 	{
 	    if (!pixman_rect_alloc (reg, 1))
 		return NULL;
@@ -2590,6 +2589,8 @@ PREFIX (_init_from_image) (region_type_t *region,
 
     PREFIX(_init) (region);
 
+    critical_if_fail (region->data);
+
     return_if_fail (image->type == BITS);
     return_if_fail (image->bits.format == PIXMAN_a1);
 


More information about the xorg-commit mailing list