printed = sprintf(*buffer, " %s=\"%s\"", prop_name, prop_value); update_buffer_head(buffer, printed); 
printed = sprintf(*buffer, " %s=\"%s\"", prop_name, prop_value); update_buffer_head(*buffer, printed); 
dump_data_element(	int depth, char **buffer, const crm_data_t *data, gboolean formatted) {	int lpc = 0;	int printed = 0;	int child_result = 0;	int has_children = 0;	const char *name = crm_element_name(data);	crm_debug("Dumping %s...", name);	if(buffer == NULL || *buffer == NULL) {		crm_err("No buffer supplied to dump XML into");		return -1;	} else if(data == NULL) {		crm_warn("No data to dump as XML");		(*buffer)[0] = EOS;		return 0;	} else if(name == NULL && depth == 0) {		xml_child_iter(			data, a_child, NULL,			child_result = dump_data_element(				depth, buffer, a_child, formatted);			if(child_result < 0) {				return child_result;			}			);		return 0;	} else if(name == NULL) {		crm_err("Cannot dump NULL element at depth %d", depth);		return -1;	}		if(formatted) {		printed = print_spaces(*buffer, depth);		update_buffer_head(buffer, printed);	}		printed = sprintf(*buffer, "<%s", name);	update_buffer_head(buffer, printed);	xml_prop_iter(		data, prop_name, prop_value,		if(safe_str_eq(XML_ATTR_TAGNAME, prop_name)) {			continue;		} else if(safe_str_eq(XML_ATTR_PARENT, prop_name)) {			continue;		}				crm_debug("Dumping <%s %s=\"%s\"...",			  name, prop_name, prop_value);		printed = sprintf(*buffer, " %s=\"%s\"", prop_name, prop_value);		update_buffer_head(buffer, printed);		);	xml_child_iter(		data, child, NULL,		if(child != NULL) {			has_children++;			break;		}		);	printed = sprintf(*buffer, "%s>%s",			  has_children==0?"/":"", formatted?"\n":"");	update_buffer_head(buffer, printed);	if(has_children == 0) {		return 0;	}		xml_child_iter(		data, child, NULL,		child_result = dump_data_element(			depth+1, buffer, child, formatted);		if(child_result < 0) { return -1; }		);	if(formatted) {		printed = print_spaces(*buffer, depth);		update_buffer_head(buffer, printed);	}	printed = sprintf(*buffer, "</%s>%s", name, formatted?"\n":"");	update_buffer_head(buffer, printed);	crm_debug("Dumped %s...", name);	return has_children;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/5882b0444d6c34515e23218dce54573874ff1be4/xml.c/buggy/crm/common/xml.c