Cleanup some unnecessary void * casts when using pfree() in contrib/xml
authorNeil Conway <neilc@samurai.com>
Wed, 13 Oct 2004 01:26:42 +0000 (01:26 +0000)
committerNeil Conway <neilc@samurai.com>
Wed, 13 Oct 2004 01:26:42 +0000 (01:26 +0000)
and contrib/xml2

contrib/xml/pgxml_dom.c
contrib/xml2/xpath.c

index 2b11b1d64683498c3f3edae75c1a00900bf2469d..47913647d3a7ea201cebed35fccf5c1bfb79e64a 100644 (file)
@@ -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);
index 67ae99fbfbb56451484c192a9285c2932d896466..ca95d41c22632f328acddfac50f1308124b6776c 100644 (file)
@@ -79,7 +79,7 @@ static void
 pgxml_pfree(void *ptr)
 {
 /*     elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
-       return pfree(ptr);
+       pfree(ptr);
 }
 
 static char *
@@ -322,7 +322,7 @@ xpath_nodeset(PG_FUNCTION_ARGS)
                                                                 toptag, septag, NULL);
 
        /* xmlCleanupParser(); done by result_to_text routine */
-       pfree((void *) xpath);
+       pfree(xpath);
 
        if (xpres == NULL)
                PG_RETURN_NULL();
@@ -358,7 +358,7 @@ xpath_list(PG_FUNCTION_ARGS)
                                                                 NULL, NULL, plainsep);
 
        /* xmlCleanupParser(); done by result_to_text routine */
-       pfree((void *) xpath);
+       pfree(xpath);
 
        if (xpres == NULL)
                PG_RETURN_NULL();
@@ -399,7 +399,7 @@ xpath_string(PG_FUNCTION_ARGS)
                                                                 NULL, NULL, NULL);
 
        xmlCleanupParser();
-       pfree((void *) xpath);
+       pfree(xpath);
 
        if (xpres == NULL)
                PG_RETURN_NULL();
@@ -429,7 +429,7 @@ xpath_number(PG_FUNCTION_ARGS)
        xpath = pgxml_texttoxmlchar(xpathsupp);
 
        res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
-       pfree((void *) xpath);
+       pfree(xpath);
 
        if (res == NULL)
        {
@@ -469,7 +469,7 @@ xpath_bool(PG_FUNCTION_ARGS)
        xpath = pgxml_texttoxmlchar(xpathsupp);
 
        res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
-       pfree((void *) xpath);
+       pfree(xpath);
 
        if (res == NULL)
        {