mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Cleanup some unnecessary void * casts when using pfree() in contrib/xml
and contrib/xml2
This commit is contained in:
@ -47,7 +47,7 @@ pgxml_repalloc(void *ptr, size_t size)
|
||||
static void
|
||||
pgxml_pfree(void *ptr)
|
||||
{
|
||||
return pfree(ptr);
|
||||
pfree(ptr);
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -216,7 +216,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
|
||||
{
|
||||
elog(WARNING, "XPath syntax error");
|
||||
xmlFreeDoc(doctree);
|
||||
pfree((void *) xpath);
|
||||
pfree(xpath);
|
||||
xmlCleanupParser();
|
||||
PG_RETURN_NULL();
|
||||
}
|
||||
@ -228,7 +228,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
|
||||
if (res == NULL)
|
||||
{
|
||||
xmlFreeDoc(doctree);
|
||||
pfree((void *) xpath);
|
||||
pfree(xpath);
|
||||
xmlCleanupParser();
|
||||
PG_RETURN_NULL(); /* seems appropriate */
|
||||
}
|
||||
@ -258,7 +258,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
|
||||
|
||||
/* Free various storage */
|
||||
xmlFreeDoc(doctree);
|
||||
pfree((void *) xpath);
|
||||
pfree(xpath);
|
||||
xmlFree(xpresstr);
|
||||
xmlCleanupParser();
|
||||
PG_RETURN_TEXT_P(xpres);
|
||||
|
Reference in New Issue
Block a user