diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2006-08-11 11:18:24 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-08-11 11:18:24 -0400 |
commit | 22eee1db000ac03a8cbd0b0bdb689b6d3a127737 (patch) | |
tree | 0e6e9aae516316afd3a7fad0bf78ac5b2027b8c8 /pixman/src | |
parent | ab3b400bda61a8fc48bb74dc3134237ddce4a81f (diff) |
[warnings] Fixes for sparse. This fixes a lot of instances of 0 vs NULL
Diffstat (limited to 'pixman/src')
-rw-r--r-- | pixman/src/fbcompose.c | 20 | ||||
-rw-r--r-- | pixman/src/icimage.c | 22 | ||||
-rw-r--r-- | pixman/src/icutil.c | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c index 03bb5d513..67ac83d21 100644 --- a/pixman/src/fbcompose.c +++ b/pixman/src/fbcompose.c @@ -3764,7 +3764,7 @@ fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer) /* 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 *data, CARD32 *scanline_buffer) 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 *data, CARD32 *scanline_buffer) 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 *data, CARD32 *scanline_buffer) /* 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 *data, CARD32 *scanline_buffer) } 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 *data, CARD32 *scanline_buffer) /* 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 *data, CARD32 *scanline_buffer) 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 *data, CARD32 *scanline_buffer) 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 *data, CARD32 *scanline_buffer) /* 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 ea04636f0..11e839617 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 (const pixman_linear_gradient_t *gradient, 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 (const pixman_linear_gradient_t *gradient, { free (linear); free (image); - return 0; + return NULL; } return image; @@ -251,18 +251,18 @@ pixman_image_create_radial_gradient (const pixman_radial_gradient_t *gradient, 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 (const pixman_radial_gradient_t *gradient, { free (radial); free (image); - return 0; + return NULL; } return image; @@ -470,7 +470,7 @@ pixman_image_get_data (pixman_image_t *image) 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 e1c7fd08b..55ee29342 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; } |