1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Added cleanup routines, cleanup with -pedantic on linux, closed #3788, Daniel

This commit is contained in:
Daniel Veillard
1999-11-24 18:04:22 +00:00
parent 11a48ec6f4
commit a819dace56
27 changed files with 597 additions and 501 deletions

9
tree.c
View File

@ -2063,10 +2063,11 @@ xmlNodeSetLang(xmlNodePtr cur, const xmlChar *lang) {
* attribute or the one carried by the nearest ancestor.
*
* Returns a pointer to the lang value, or NULL if not found
* It's up to the caller to free the memory.
*/
const xmlChar *
xmlChar *
xmlNodeGetLang(xmlNodePtr cur) {
const xmlChar *lang;
xmlChar *lang;
while (cur != NULL) {
lang = xmlGetProp(cur, BAD_CAST "xml:lang");
@ -2470,8 +2471,10 @@ xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar *href) {
* Search and get the value of an attribute associated to a node
* This does the entity substitution.
* Returns the attribute value or NULL if not found.
* It's up to the caller to free the memory.
*/
xmlChar *xmlGetProp(xmlNodePtr node, const xmlChar *name) {
xmlChar *
xmlGetProp(xmlNodePtr node, const xmlChar *name) {
xmlAttrPtr prop = node->properties;
while (prop != NULL) {