summaryrefslogtreecommitdiff
path: root/xpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'xpath.c')
-rw-r--r--xpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xpath.c b/xpath.c
index ffd2a489..e9f5bf92 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++;