Skip to content

Commit

Permalink
Bug 692922 - Fix use of posix_memalign() avoiding typecasts. r=BenWa
Browse files Browse the repository at this point in the history
  • Loading branch information
fossterer committed May 9, 2014
1 parent f1f1004 commit a319938
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gfx/qcms/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,11 +923,16 @@ void precache_release(struct precache_output *p)
}
}

#ifdef HAS_POSIX_MEMALIGN
#ifdef HAVE_POSIX_MEMALIGN
static qcms_transform *transform_alloc(void)
{
qcms_transform *t;
if (!posix_memalign(&t, 16, sizeof(*t))) {

void *allocated_memory;
if (!posix_memalign(&allocated_memory, 16, sizeof(qcms_transform))) {
/* Doing a memset to initialise all bits to 'zero'*/
memset(allocated_memory, 0, sizeof(qcms_transform));
t = allocated_memory;
return t;
} else {
return NULL;
Expand Down

0 comments on commit a319938

Please sign in to comment.