From 31b6459484ff8d6f7fdbbb9533c45c15b03c18a3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 8 Jul 2014 12:18:41 -0400 Subject: [PATCH] libfreerdp-codec: don't use posix_memalign --- libfreerdp/codec/color.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libfreerdp/codec/color.c b/libfreerdp/codec/color.c index 4e9e357..034df14 100644 --- a/libfreerdp/codec/color.c +++ b/libfreerdp/codec/color.c @@ -605,13 +605,12 @@ BYTE* freerdp_image_convert_16bpp(BYTE* srcData, BYTE* dstData, int width, int h { primitives_t* prims; - if (dstData == NULL) + if (!dstData) { - if (posix_memalign((void **) &dstData, 16, - width * height * sizeof(UINT32)) != 0) - { + dstData = _aligned_malloc(width * height * sizeof(UINT32), 16); + + if (!dstData) return NULL; - } } prims = primitives_get(); -- 2.7.4