Merge pull request #396 from celsius/master

remove redundant or useless (?) checks for NULL pointer
This commit is contained in:
Marc-André Moreau 2012-02-03 07:59:35 -08:00
commit c422c7477a
2 changed files with 2 additions and 9 deletions

View File

@ -887,18 +887,13 @@ void xf_window_free(xfInfo* xfi)
}
if (context != NULL)
{
if (context->cache != NULL)
{
cache_free(context->cache);
context->cache = NULL;
}
if (context->rail != NULL)
{
rail_free(context->rail);
context->rail = NULL;
}
}
if (xfi->rfx_context)
{
@ -917,7 +912,6 @@ void xf_free(xfInfo* xfi)
{
xf_window_free(xfi);
if (xfi->bmp_codec_none != NULL)
xfree(xfi->bmp_codec_none);
XCloseDisplay(xfi->display);

View File

@ -103,7 +103,6 @@ void* xrealloc(void* ptr, size_t size)
void xfree(void* ptr)
{
if (ptr != NULL)
free(ptr);
}