commit - acdafe9c25c0e859deb1540d58c50723221f12c8
commit + 72a9cb46de886cdce06a733a113b6ed47be4969b
blob - 19f8a058e47ae867d2b187b9c3a0d687d1b2d0c2
blob + 93cab5bc651a6c3c3f52c54de341de80c62862ea
--- tog/tog.c
+++ tog/tog.c
return err;
}
-static const struct got_error *
+static void
view_set_child(struct tog_view *view, struct tog_view *child)
{
- const struct got_error *err = NULL;
-
view->child = child;
child->parent = view;
- return err;
}
static int
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, diff_view);
- if (err) {
- view_close(diff_view);
- break;
- }
+ view_set_child(view, diff_view);
*focus_view = diff_view;
} else
*new_view = diff_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, tree_view);
- if (err) {
- view_close(tree_view);
- break;
- }
+ view_set_child(view, tree_view);
*focus_view = tree_view;
} else
*new_view = tree_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, ref_view);
- if (err) {
- view_close(ref_view);
- break;
- }
+ view_set_child(view, ref_view);
*focus_view = ref_view;
} else
*new_view = ref_view;
err = view_close_child(view);
if (err)
break;
- err = view_set_child(view, diff_view);
- if (err) {
- view_close(diff_view);
- break;
- }
+ view_set_child(view, diff_view);
*focus_view = diff_view;
} else
*new_view = diff_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, log_view);
- if (err) {
- view_close(log_view);
- break;
- }
+ view_set_child(view, log_view);
*focus_view = log_view;
} else
*new_view = log_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, ref_view);
- if (err) {
- view_close(ref_view);
- break;
- }
+ view_set_child(view, ref_view);
*focus_view = ref_view;
} else
*new_view = ref_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, blame_view);
- if (err) {
- view_close(blame_view);
- break;
- }
+ view_set_child(view, blame_view);
*focus_view = blame_view;
} else
*new_view = blame_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, log_view);
- if (err) {
- view_close(log_view);
- break;
- }
+ view_set_child(view, log_view);
*focus_view = log_view;
} else
*new_view = log_view;
err = view_close_child(view);
if (err)
return err;
- err = view_set_child(view, tree_view);
- if (err) {
- view_close(tree_view);
- break;
- }
+ view_set_child(view, tree_view);
*focus_view = tree_view;
} else
*new_view = tree_view;