Stop passing "http" to getaddrinfo in the case when we only need an IP
[sgt/agedu] / trie.c
diff --git a/trie.c b/trie.c
index ad0cd84..d170458 100644 (file)
--- a/trie.c
+++ b/trie.c
@@ -218,7 +218,7 @@ static off_t triebuild_unwind(triebuild *tb, int targetdepth, int *outcount)
     while (depth > targetdepth) {
        int odepth = depth;
        while (depth > targetdepth &&
-              (depth-1 > tb->switchsize || !tb->switches ||
+              (depth-1 >= tb->switchsize || !tb->switches ||
                tb->switches[depth-1].len == 0))
            depth--;
        if (odepth > depth) {
@@ -484,6 +484,7 @@ static unsigned long long fake_atime_recurse(void *t, struct trie_common *node,
 
        return max;
     }
+    return 0;                         /* placate lint */
 }
 
 void trie_fake_dir_atimes(void *t)