Unverified Commit 4cca1b4b authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'sunweaver-pr/more-X-memory-macro-fixes' into 3.6.x

Attributes GH PR #605: https://github.com/ArcticaProject/nx-libs/pull/605 Reviewed-by: Ulrich Sibiller <uli42@gmx.de> -- Thu, 14 Dec 2017 13:15:12 +0000
parents 8cca3f09 5597f2ea
......@@ -754,7 +754,7 @@ void nxagentCollectPropertyEvent(int resource)
if (pszReturnData != NULL)
{
free(pszReturnData);
XFree(pszReturnData);
}
return;
......@@ -796,7 +796,7 @@ void nxagentCollectPropertyEvent(int resource)
if (pszReturnData != NULL)
{
free(pszReturnData);
XFree(pszReturnData);
}
return;
......@@ -974,7 +974,7 @@ void nxagentNotifySelection(XEvent *X)
}
/*
* free(pszReturnData);
* XFree(pszReturnData);
* pszReturnData=NULL;
*/
......
......@@ -73,7 +73,7 @@ char *BitmapCompressData(XImage *image, unsigned int *size)
*size = image -> width * image -> height * 3;
data = Xmalloc(*size);
data = malloc(*size);
if (data == NULL)
{
......
......@@ -39,13 +39,6 @@ extern "C" {
#include <nx/NXvars.h>
/*
* All the NX code should use these.
*/
#define Xmalloc(size) malloc((size))
#define Xfree(ptr) free((ptr))
/*
* Maximum number of supported pack methods.
*/
......
......@@ -67,7 +67,7 @@ char *ZCompressData(const char *plainData, unsigned int plainSize, int threshold
*compressedSize = plainSize + (plainSize / 1000) + 12 + 1;
compressedData = Xmalloc(*compressedSize);
compressedData = malloc(*compressedSize);
if (compressedData == NULL)
{
......@@ -129,7 +129,7 @@ char *ZCompressData(const char *plainData, unsigned int plainSize, int threshold
plainSize, zError(result));
#endif
Xfree(compressedData);
free(compressedData);
*compressedSize = 0;
......@@ -245,7 +245,7 @@ int ZInitEncoder()
{
int result;
zStream = Xmalloc(sizeof(z_stream));
zStream = malloc(sizeof(z_stream));
if (zStream == NULL)
{
......@@ -300,7 +300,7 @@ int ZResetEncoder()
#endif
}
Xfree(zStream);
free(zStream);
}
zInitialized = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment