[cairo-commit] pixman/src

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Aug 11 08:18:32 PDT 2006


 pixman/src/fbcompose.c |   20 ++++++++++----------
 pixman/src/icimage.c   |   22 +++++++++++-----------
 pixman/src/icutil.c    |    2 +-
 3 files changed, 22 insertions(+), 22 deletions(-)

New commits:
diff-tree 22eee1db000ac03a8cbd0b0bdb689b6d3a127737 (from ab3b400bda61a8fc48bb74dc3134237ddce4a81f)
Author: Kjartan Maraas <kmaraas at gnome.org>
Date:   Fri Aug 11 11:18:24 2006 -0400

    [warnings] Fixes for sparse.  This fixes a lot of instances of 0 vs NULL

diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index 03bb5d5..67ac83d 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -3764,7 +3764,7 @@ fbCompositeRect (const FbComposeData *da
 		    /* fetch mask before source so that fetching of
 		       source can be optimized */
 		    fetchMask (data->mask, data->xMask, data->yMask + i,
-			       data->width, mask_buffer, 0, 0);
+			       data->width, mask_buffer, NULL, 0);
 
 		    if (maskClass == SourcePictClassHorizontal)
 			fetchMask = NULL;
@@ -3773,7 +3773,7 @@ fbCompositeRect (const FbComposeData *da
 		if (srcClass == SourcePictClassHorizontal)
 		{
 		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, 0, 0);
+			      data->width, src_buffer, NULL, 0);
 		    fetchSrc = NULL;
 		}
 		else
@@ -3786,7 +3786,7 @@ fbCompositeRect (const FbComposeData *da
 	    else if (fetchMask)
 	    {
 		fetchMask (data->mask, data->xMask, data->yMask + i,
-			   data->width, mask_buffer, 0, 0);
+			   data->width, mask_buffer, NULL, 0);
 	    }
 
 	    if (store)
@@ -3794,7 +3794,7 @@ fbCompositeRect (const FbComposeData *da
 		/* fill dest into second half of scanline */
 		if (fetchDest)
 		    fetchDest (data->dest, data->xDest, data->yDest + i,
-			       data->width, dest_buffer, 0, 0);
+			       data->width, dest_buffer, NULL, 0);
 
 		/* blend */
 		compose (dest_buffer, src_buffer, mask_buffer, data->width);
@@ -3814,8 +3814,8 @@ fbCompositeRect (const FbComposeData *da
     }
     else
     {
-	CARD32 *src_mask_buffer = 0; /* squelch bogus compiler warning */
-	CARD32 *mask_buffer = 0;
+	CARD32 *src_mask_buffer = NULL; /* squelch bogus compiler warning */
+	CARD32 *mask_buffer = NULL;
 	CombineFuncU compose = composeFunctions.combineU[data->op];
 	if (!compose)
 	    return;
@@ -3832,7 +3832,7 @@ fbCompositeRect (const FbComposeData *da
 		    /* fetch mask before source so that fetching of
 		       source can be optimized */
 		    fetchMask (data->mask, data->xMask, data->yMask + i,
-			       data->width, mask_buffer, 0, 0);
+			       data->width, mask_buffer, NULL, 0);
 
 		    if (maskClass == SourcePictClassHorizontal)
 			fetchMask = NULL;
@@ -3841,7 +3841,7 @@ fbCompositeRect (const FbComposeData *da
 		if (srcClass == SourcePictClassHorizontal)
 		{
 		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, 0, 0);
+			      data->width, src_buffer, NULL, 0);
 
 		    if (mask_buffer)
 		    {
@@ -3870,7 +3870,7 @@ fbCompositeRect (const FbComposeData *da
 	    else if (fetchMask)
 	    {
 		fetchMask (data->mask, data->xMask, data->yMask + i,
-			   data->width, mask_buffer, 0, 0);
+			   data->width, mask_buffer, NULL, 0);
 
 		fbCombineInU (mask_buffer, src_buffer, data->width);
 
@@ -3882,7 +3882,7 @@ fbCompositeRect (const FbComposeData *da
 		/* fill dest into second half of scanline */
 		if (fetchDest)
 		    fetchDest (data->dest, data->xDest, data->yDest + i,
-			       data->width, dest_buffer, 0, 0);
+			       data->width, dest_buffer, NULL, 0);
 
 		/* blend */
 		compose (dest_buffer, src_mask_buffer, data->width);
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index ea04636..11e8396 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -188,8 +188,8 @@ _pixman_create_source_image (void)
     pixman_image_t *image;
 
     image = (pixman_image_t *) malloc (sizeof (pixman_image_t));
-    image->pDrawable   = 0;
-    image->pixels      = 0;
+    image->pDrawable   = NULL;
+    image->pixels      = NULL;
     image->format_code = PICT_a8r8g8b8;
 
     pixman_image_init (image);
@@ -206,18 +206,18 @@ pixman_image_create_linear_gradient (con
     pixman_image_t		   *image;
 
     if (n_stops < 2)
-	return 0;
+	return NULL;
 
     image = _pixman_create_source_image ();
     if (!image)
-	return 0;
+	return NULL;
 
     linear = malloc (sizeof (pixman_linear_gradient_image_t) +
 		     sizeof (pixman_gradient_stop_t) * n_stops);
     if (!linear)
     {
 	free (image);
-	return 0;
+	return NULL;
     }
 
     linear->stops  = (pixman_gradient_stop_t *) (linear + 1);
@@ -235,7 +235,7 @@ pixman_image_create_linear_gradient (con
     {
 	free (linear);
 	free (image);
-	return 0;
+	return NULL;
     }
 
     return image;
@@ -251,18 +251,18 @@ pixman_image_create_radial_gradient (con
     double			   x;
 
     if (n_stops < 2)
-	return 0;
+	return NULL;
 
     image = _pixman_create_source_image ();
     if (!image)
-	return 0;
+	return NULL;
 
     radial = malloc (sizeof (pixman_radial_gradient_image_t) +
 		     sizeof (pixman_gradient_stop_t) * n_stops);
     if (!radial)
     {
 	free (image);
-	return 0;
+	return NULL;
     }
 
     radial->stops  = (pixman_gradient_stop_t *) (radial + 1);
@@ -291,7 +291,7 @@ pixman_image_create_radial_gradient (con
     {
 	free (radial);
 	free (image);
-	return 0;
+	return NULL;
     }
 
     return image;
@@ -470,7 +470,7 @@ pixman_image_get_data (pixman_image_t	*i
     if (image->pixels)
 	return image->pixels->data;
 
-    return 0;
+    return NULL;
 }
 
 void
diff --git a/pixman/src/icutil.c b/pixman/src/icutil.c
index e1c7fd0..55ee293 100644
--- a/pixman/src/icutil.c
+++ b/pixman/src/icutil.c
@@ -281,5 +281,5 @@ fbStippleTable(int bits)
     case 8:
 	return fbStipple8Bits;
     }
-    return 0;
+    return NULL;
 }


More information about the cairo-commit mailing list