This patch cleans up some unnecessary void * casts in contrib/xml and
contrib/xml2.

Barring any objections, I intend to apply this to HEAD tomorrow.

-Neil

Index: contrib/xml/pgxml_dom.c
===================================================================
RCS file: /var/lib/cvs/pgsql/contrib/xml/pgxml_dom.c,v
retrieving revision 1.7
diff -c -r1.7 pgxml_dom.c
*** contrib/xml/pgxml_dom.c	5 Mar 2004 03:57:58 -0000	1.7
--- contrib/xml/pgxml_dom.c	12 Oct 2004 01:20:13 -0000
***************
*** 47,53 ****
  static void
  pgxml_pfree(void *ptr)
  {
! 	return pfree(ptr);
  }
  
  static char *
--- 47,53 ----
  static void
  pgxml_pfree(void *ptr)
  {
! 	pfree(ptr);
  }
  
  static char *
***************
*** 216,222 ****
  	{
  		elog(WARNING, "XPath syntax error");
  		xmlFreeDoc(doctree);
! 		pfree((void *) xpath);
  		xmlCleanupParser();
  		PG_RETURN_NULL();
  	}
--- 216,222 ----
  	{
  		elog(WARNING, "XPath syntax error");
  		xmlFreeDoc(doctree);
! 		pfree(xpath);
  		xmlCleanupParser();
  		PG_RETURN_NULL();
  	}
***************
*** 228,234 ****
  	if (res == NULL)
  	{
  		xmlFreeDoc(doctree);
! 		pfree((void *) xpath);
  		xmlCleanupParser();
  		PG_RETURN_NULL();		/* seems appropriate */
  	}
--- 228,234 ----
  	if (res == NULL)
  	{
  		xmlFreeDoc(doctree);
! 		pfree(xpath);
  		xmlCleanupParser();
  		PG_RETURN_NULL();		/* seems appropriate */
  	}
***************
*** 258,264 ****
  
  	/* Free various storage */
  	xmlFreeDoc(doctree);
! 	pfree((void *) xpath);
  	xmlFree(xpresstr);
  	xmlCleanupParser();
  	PG_RETURN_TEXT_P(xpres);
--- 258,264 ----
  
  	/* Free various storage */
  	xmlFreeDoc(doctree);
! 	pfree(xpath);
  	xmlFree(xpresstr);
  	xmlCleanupParser();
  	PG_RETURN_TEXT_P(xpres);
Index: contrib/xml2/xpath.c
===================================================================
RCS file: /var/lib/cvs/pgsql/contrib/xml2/xpath.c,v
retrieving revision 1.3
diff -c -r1.3 xpath.c
*** contrib/xml2/xpath.c	29 Aug 2004 05:06:39 -0000	1.3
--- contrib/xml2/xpath.c	12 Oct 2004 01:26:19 -0000
***************
*** 79,85 ****
  pgxml_pfree(void *ptr)
  {
  /*	elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
! 	return pfree(ptr);
  }
  
  static char *
--- 79,85 ----
  pgxml_pfree(void *ptr)
  {
  /*	elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
! 	pfree(ptr);
  }
  
  static char *
***************
*** 322,328 ****
  								 toptag, septag, NULL);
  
  	/* xmlCleanupParser(); done by result_to_text routine */
! 	pfree((void *) xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
--- 322,328 ----
  								 toptag, septag, NULL);
  
  	/* xmlCleanupParser(); done by result_to_text routine */
! 	pfree(xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
***************
*** 358,364 ****
  								 NULL, NULL, plainsep);
  
  	/* xmlCleanupParser(); done by result_to_text routine */
! 	pfree((void *) xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
--- 358,364 ----
  								 NULL, NULL, plainsep);
  
  	/* xmlCleanupParser(); done by result_to_text routine */
! 	pfree(xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
***************
*** 399,405 ****
  								 NULL, NULL, NULL);
  
  	xmlCleanupParser();
! 	pfree((void *) xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
--- 399,405 ----
  								 NULL, NULL, NULL);
  
  	xmlCleanupParser();
! 	pfree(xpath);
  
  	if (xpres == NULL)
  		PG_RETURN_NULL();
***************
*** 429,435 ****
  	xpath = pgxml_texttoxmlchar(xpathsupp);
  
  	res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
! 	pfree((void *) xpath);
  
  	if (res == NULL)
  	{
--- 429,435 ----
  	xpath = pgxml_texttoxmlchar(xpathsupp);
  
  	res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
! 	pfree(xpath);
  
  	if (res == NULL)
  	{
***************
*** 469,475 ****
  	xpath = pgxml_texttoxmlchar(xpathsupp);
  
  	res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
! 	pfree((void *) xpath);
  
  	if (res == NULL)
  	{
--- 469,475 ----
  	xpath = pgxml_texttoxmlchar(xpathsupp);
  
  	res = pgxml_xpath(PG_GETARG_TEXT_P(0), xpath);
! 	pfree(xpath);
  
  	if (res == NULL)
  	{
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to