mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
Bug 692922 - Fix use of posix_memalign() avoiding typecasts. r=BenWa
This commit is contained in:
parent
f1f1004123
commit
a31993883d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user