}
/* Copy the contents, one by one. */
int ret = kr_ok();
- trie_it_t *it;
+ trie_it_t *it = NULL;
for (it = trie_it_begin(src->nsset); !trie_it_finished(it); trie_it_next(it)) {
size_t klen;
const char * const k = trie_it_key(it, &klen);
return NULL;
}
+ trie_it_t *it = NULL;
const knot_dname_t *result = NULL;
- trie_it_t *it;
for (it = trie_it_begin(cut->nsset); !trie_it_finished(it); trie_it_next(it)) {
- result = (const knot_dname_t *)trie_it_key(it, NULL);
+ size_t klen;
+ result = (const knot_dname_t *) trie_it_key(it, &klen);
break;
}
trie_it_free(it);
+
return result;
}
\ No newline at end of file