Better fix for invalid variable usage.

No point in having to pointers, and fix formatting.

SVN revision: 57037
This commit is contained in:
Sebastian Dransfeld 2011-02-14 20:21:10 +00:00
parent 0229e71b48
commit bd9d4c5019
1 changed files with 5 additions and 7 deletions

View File

@ -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;
}