From 1551ae125803312c42dcb8514c598785d79b20a5 Mon Sep 17 00:00:00 2001 From: englebass Date: Mon, 14 Feb 2011 20:21:10 +0000 Subject: [PATCH] Better fix for invalid variable usage. No point in having to pointers, and fix formatting. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@57037 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/engines/common/evas_convert_colorspace.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib/engines/common/evas_convert_colorspace.c b/src/lib/engines/common/evas_convert_colorspace.c index 21a5f59..341d34a 100644 --- a/src/lib/engines/common/evas_convert_colorspace.c +++ b/src/lib/engines/common/evas_convert_colorspace.c @@ -50,22 +50,20 @@ static inline void * evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha) { uint32_t *src, *end; - uint8_t *ret, *dst; + uint8_t *ret; src = data; end = src + (stride * h); ret = malloc(w * h); - if(!ret) return NULL; - - dst = ret; + if (!ret) return NULL; if (!has_alpha) { - return memset(ret,0xff, w * h); + return memset(ret, 0xff, w * h); } - for ( ; src < end ; src ++, dst ++) - *dst = CONVERT_ARGB_8888_TO_A_8(*src); + for ( ; src < end ; src++, ret++) + *ret = CONVERT_ARGB_8888_TO_A_8(*src); return ret; } -- 2.7.4