Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04a1a24

Browse files
author
Neil Conway
committed
Cleanup some unnecessary void * casts when using pfree() in contrib/xml
and contrib/xml2
1 parent7069dbc commit04a1a24

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎contrib/xml/pgxml_dom.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pgxml_repalloc(void *ptr, size_t size)
4747
staticvoid
4848
pgxml_pfree(void*ptr)
4949
{
50-
returnpfree(ptr);
50+
pfree(ptr);
5151
}
5252

5353
staticchar*
@@ -216,7 +216,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
216216
{
217217
elog(WARNING,"XPath syntax error");
218218
xmlFreeDoc(doctree);
219-
pfree((void*)xpath);
219+
pfree(xpath);
220220
xmlCleanupParser();
221221
PG_RETURN_NULL();
222222
}
@@ -228,7 +228,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
228228
if (res==NULL)
229229
{
230230
xmlFreeDoc(doctree);
231-
pfree((void*)xpath);
231+
pfree(xpath);
232232
xmlCleanupParser();
233233
PG_RETURN_NULL();/* seems appropriate */
234234
}
@@ -258,7 +258,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
258258

259259
/* Free various storage */
260260
xmlFreeDoc(doctree);
261-
pfree((void*)xpath);
261+
pfree(xpath);
262262
xmlFree(xpresstr);
263263
xmlCleanupParser();
264264
PG_RETURN_TEXT_P(xpres);

‎contrib/xml2/xpath.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static void
7979
pgxml_pfree(void*ptr)
8080
{
8181
/*elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
82-
returnpfree(ptr);
82+
pfree(ptr);
8383
}
8484

8585
staticchar*
@@ -322,7 +322,7 @@ xpath_nodeset(PG_FUNCTION_ARGS)
322322
toptag,septag,NULL);
323323

324324
/* xmlCleanupParser(); done by result_to_text routine */
325-
pfree((void*)xpath);
325+
pfree(xpath);
326326

327327
if (xpres==NULL)
328328
PG_RETURN_NULL();
@@ -358,7 +358,7 @@ xpath_list(PG_FUNCTION_ARGS)
358358
NULL,NULL,plainsep);
359359

360360
/* xmlCleanupParser(); done by result_to_text routine */
361-
pfree((void*)xpath);
361+
pfree(xpath);
362362

363363
if (xpres==NULL)
364364
PG_RETURN_NULL();
@@ -399,7 +399,7 @@ xpath_string(PG_FUNCTION_ARGS)
399399
NULL,NULL,NULL);
400400

401401
xmlCleanupParser();
402-
pfree((void*)xpath);
402+
pfree(xpath);
403403

404404
if (xpres==NULL)
405405
PG_RETURN_NULL();
@@ -429,7 +429,7 @@ xpath_number(PG_FUNCTION_ARGS)
429429
xpath=pgxml_texttoxmlchar(xpathsupp);
430430

431431
res=pgxml_xpath(PG_GETARG_TEXT_P(0),xpath);
432-
pfree((void*)xpath);
432+
pfree(xpath);
433433

434434
if (res==NULL)
435435
{
@@ -469,7 +469,7 @@ xpath_bool(PG_FUNCTION_ARGS)
469469
xpath=pgxml_texttoxmlchar(xpathsupp);
470470

471471
res=pgxml_xpath(PG_GETARG_TEXT_P(0),xpath);
472-
pfree((void*)xpath);
472+
pfree(xpath);
473473

474474
if (res==NULL)
475475
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp