diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-03-08 16:44:11 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-03-08 16:44:11 +0100 |
commit | ba58f23c60862f2158b457f4d30031761bf4dde1 (patch) | |
tree | c615f35a9a5e981daa3b209a0a09c2bcf6267270 | |
parent | f6aaabce85baf48d622cb4686df810fdba3db073 (diff) | |
download | android_external_libxml2-ba58f23c60862f2158b457f4d30031761bf4dde1.tar.gz android_external_libxml2-ba58f23c60862f2158b457f4d30031761bf4dde1.tar.bz2 android_external_libxml2-ba58f23c60862f2158b457f4d30031761bf4dde1.zip |
Fix order of root nodes
Make sure root nodes are sorted before other nodes.
-rw-r--r-- | xpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++; |