Skip to content
Snippets Groups Projects
Commit 6a516753 authored by Libor Peltan's avatar Libor Peltan Committed by Daniel Salzman
Browse files

contents: refactor zone_contents_find_dname()

parent e30edac7
No related branches found
No related tags found
No related merge requests found
......@@ -301,22 +301,17 @@ int zone_contents_find_dname(const zone_contents_t *zone,
if (found < 0) {
// error
return found;
} else if (found == 1 && previous != NULL) {
} else if (found == 1) {
// exact match
assert(node && prev);
*match = node;
*closest = node;
*previous = prev;
return ZONE_NAME_FOUND;
} else if (found == 1 && previous == NULL) {
// exact match, zone not adjusted yet
// if previous==NULL, zone not adjusted yet
assert(node);
*match = node;
*closest = node;
if (previous != NULL) {
assert(prev);
*previous = prev;
}
return ZONE_NAME_FOUND;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment