[libxml2] Fix order of root nodes
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix order of root nodes
- Date: Sun, 8 Mar 2015 16:15:01 +0000 (UTC)
commit ba58f23c60862f2158b457f4d30031761bf4dde1
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sun Mar 8 16:44:11 2015 +0100
Fix order of root nodes
Make sure root nodes are sorted before other nodes.
xpath.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/xpath.c b/xpath.c
index ffd2a48..e9f5bf9 100644
--- a/xpath.c
+++ b/xpath.c
@@ -361,13 +361,13 @@ turtle_comparison:
/*
* compute depth to root
*/
- for (depth2 = 0, cur = node2;cur->parent != NULL;cur = cur->parent) {
+ for (depth2 = 0, cur = node2; cur != NULL; cur = cur->parent) {
if (cur == node1)
return(1);
depth2++;
}
root = cur;
- for (depth1 = 0, cur = node1;cur->parent != NULL;cur = cur->parent) {
+ for (depth1 = 0, cur = node1; cur != NULL; cur = cur->parent) {
if (cur == node2)
return(-1);
depth1++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]