Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
04a1a24e
Commit
04a1a24e
authored
Oct 13, 2004
by
Neil Conway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup some unnecessary void * casts when using pfree() in contrib/xml
and contrib/xml2
parent
7069dbcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
contrib/xml/pgxml_dom.c
contrib/xml/pgxml_dom.c
+4
-4
contrib/xml2/xpath.c
contrib/xml2/xpath.c
+6
-6
No files found.
contrib/xml/pgxml_dom.c
View file @
04a1a24e
...
@@ -47,7 +47,7 @@ pgxml_repalloc(void *ptr, size_t size)
...
@@ -47,7 +47,7 @@ pgxml_repalloc(void *ptr, size_t size)
static
void
static
void
pgxml_pfree
(
void
*
ptr
)
pgxml_pfree
(
void
*
ptr
)
{
{
return
pfree
(
ptr
);
pfree
(
ptr
);
}
}
static
char
*
static
char
*
...
@@ -216,7 +216,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
...
@@ -216,7 +216,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
{
{
elog
(
WARNING
,
"XPath syntax error"
);
elog
(
WARNING
,
"XPath syntax error"
);
xmlFreeDoc
(
doctree
);
xmlFreeDoc
(
doctree
);
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
xmlCleanupParser
();
xmlCleanupParser
();
PG_RETURN_NULL
();
PG_RETURN_NULL
();
}
}
...
@@ -228,7 +228,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
...
@@ -228,7 +228,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
xmlFreeDoc
(
doctree
);
xmlFreeDoc
(
doctree
);
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
xmlCleanupParser
();
xmlCleanupParser
();
PG_RETURN_NULL
();
/* seems appropriate */
PG_RETURN_NULL
();
/* seems appropriate */
}
}
...
@@ -258,7 +258,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
...
@@ -258,7 +258,7 @@ pgxml_xpath(PG_FUNCTION_ARGS)
/* Free various storage */
/* Free various storage */
xmlFreeDoc
(
doctree
);
xmlFreeDoc
(
doctree
);
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
xmlFree
(
xpresstr
);
xmlFree
(
xpresstr
);
xmlCleanupParser
();
xmlCleanupParser
();
PG_RETURN_TEXT_P
(
xpres
);
PG_RETURN_TEXT_P
(
xpres
);
...
...
contrib/xml2/xpath.c
View file @
04a1a24e
...
@@ -79,7 +79,7 @@ static void
...
@@ -79,7 +79,7 @@ static void
pgxml_pfree
(
void
*
ptr
)
pgxml_pfree
(
void
*
ptr
)
{
{
/* elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
/* elog(DEBUG1,"Free in CMC %x",CurrentMemoryContext); */
return
pfree
(
ptr
);
pfree
(
ptr
);
}
}
static
char
*
static
char
*
...
@@ -322,7 +322,7 @@ xpath_nodeset(PG_FUNCTION_ARGS)
...
@@ -322,7 +322,7 @@ xpath_nodeset(PG_FUNCTION_ARGS)
toptag
,
septag
,
NULL
);
toptag
,
septag
,
NULL
);
/* xmlCleanupParser(); done by result_to_text routine */
/* xmlCleanupParser(); done by result_to_text routine */
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
if
(
xpres
==
NULL
)
if
(
xpres
==
NULL
)
PG_RETURN_NULL
();
PG_RETURN_NULL
();
...
@@ -358,7 +358,7 @@ xpath_list(PG_FUNCTION_ARGS)
...
@@ -358,7 +358,7 @@ xpath_list(PG_FUNCTION_ARGS)
NULL
,
NULL
,
plainsep
);
NULL
,
NULL
,
plainsep
);
/* xmlCleanupParser(); done by result_to_text routine */
/* xmlCleanupParser(); done by result_to_text routine */
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
if
(
xpres
==
NULL
)
if
(
xpres
==
NULL
)
PG_RETURN_NULL
();
PG_RETURN_NULL
();
...
@@ -399,7 +399,7 @@ xpath_string(PG_FUNCTION_ARGS)
...
@@ -399,7 +399,7 @@ xpath_string(PG_FUNCTION_ARGS)
NULL
,
NULL
,
NULL
);
NULL
,
NULL
,
NULL
);
xmlCleanupParser
();
xmlCleanupParser
();
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
if
(
xpres
==
NULL
)
if
(
xpres
==
NULL
)
PG_RETURN_NULL
();
PG_RETURN_NULL
();
...
@@ -429,7 +429,7 @@ xpath_number(PG_FUNCTION_ARGS)
...
@@ -429,7 +429,7 @@ xpath_number(PG_FUNCTION_ARGS)
xpath
=
pgxml_texttoxmlchar
(
xpathsupp
);
xpath
=
pgxml_texttoxmlchar
(
xpathsupp
);
res
=
pgxml_xpath
(
PG_GETARG_TEXT_P
(
0
),
xpath
);
res
=
pgxml_xpath
(
PG_GETARG_TEXT_P
(
0
),
xpath
);
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
...
@@ -469,7 +469,7 @@ xpath_bool(PG_FUNCTION_ARGS)
...
@@ -469,7 +469,7 @@ xpath_bool(PG_FUNCTION_ARGS)
xpath
=
pgxml_texttoxmlchar
(
xpathsupp
);
xpath
=
pgxml_texttoxmlchar
(
xpathsupp
);
res
=
pgxml_xpath
(
PG_GETARG_TEXT_P
(
0
),
xpath
);
res
=
pgxml_xpath
(
PG_GETARG_TEXT_P
(
0
),
xpath
);
pfree
(
(
void
*
)
xpath
);
pfree
(
xpath
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment