Skip to content
Snippets Groups Projects
Commit 0d6282dd authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Fixes initialization in switch case.

parent 4cfeee11
No related branches found
No related tags found
No related merge requests found
......@@ -288,6 +288,8 @@ static int xfr_xfrin_finalize(xfrworker_t *w, knot_ns_xfr_t *data)
// }
int ret = KNOTD_EOK;
int apply_ret = KNOT_EOK;
int switch_ret = KNOT_EOK;
knot_changesets_t *chs = NULL;
switch(data->type) {
......@@ -300,7 +302,7 @@ static int xfr_xfrin_finalize(xfrworker_t *w, knot_ns_xfr_t *data)
data->msgpref, knotd_strerror(ret));
} else {
dbg_xfr("xfr: %s New zone saved.\n", data->msgpref);
int switch_ret = knot_ns_switch_zone(w->ns, data);
switch_ret = knot_ns_switch_zone(w->ns, data);
if (switch_ret != KNOT_EOK) {
log_zone_error("%s Failed to switch in-memory "
"zone - %s\n", data->msgpref,
......@@ -329,7 +331,7 @@ static int xfr_xfrin_finalize(xfrworker_t *w, knot_ns_xfr_t *data)
}
/* Now, try to apply the changesets to the zone. */
int apply_ret = xfrin_apply_changesets(data->zone, chs,
apply_ret = xfrin_apply_changesets(data->zone, chs,
&data->new_contents);
if (apply_ret != KNOT_EOK) {
......
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