libfreerdp-codec: don't use posix_memalign
authorMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 8 Jul 2014 16:18:41 +0000 (12:18 -0400)
committerMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 8 Jul 2014 16:18:41 +0000 (12:18 -0400)
libfreerdp/codec/color.c

index 4e9e357..034df14 100644 (file)
@@ -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();