summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-05-30 23:24:56 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-05-30 23:24:56 +0100
commitbbb002ee1da7655f94ffb607db5e3b7c108d53ba (patch)
treef6cb4cc4697cc2561e9958f76ad7572788a080f9 /riscos
parentecee6ffad8d11f16c63ee99309110c5ef7c349a2 (diff)
downloadnetsurf-bbb002ee1da7655f94ffb607db5e3b7c108d53ba.tar.gz
netsurf-bbb002ee1da7655f94ffb607db5e3b7c108d53ba.tar.bz2
Scope reduce some variables.
Diffstat (limited to 'riscos')
-rw-r--r--riscos/treeview.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/riscos/treeview.c b/riscos/treeview.c
index 0c16626ad..d33704c8d 100644
--- a/riscos/treeview.c
+++ b/riscos/treeview.c
@@ -427,7 +427,6 @@ void ro_treeview_scroll(wimp_scroll *scroll)
void ro_treeview_redraw_loop(wimp_draw *redraw, ro_treeview *tv, osbool more)
{
- os_error *error;
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
@@ -435,6 +434,7 @@ void ro_treeview_redraw_loop(wimp_draw *redraw, ro_treeview *tv, osbool more)
};
while (more) {
+ os_error *error;
if (tv != NULL && tv->tree != NULL) {
struct rect clip;
@@ -611,7 +611,6 @@ void ro_treeview_set_window_extent(ro_treeview *tv, int width, int height)
wimp_window_state state;
int new_x, new_y;
int visible_x, visible_y;
- int new_x_scroll, new_y_scroll;
/* Calculate the new window extents, in RISC OS units. */
@@ -658,8 +657,8 @@ void ro_treeview_set_window_extent(ro_treeview *tv, int width, int height)
if ((state.flags & wimp_WINDOW_OPEN) &&
(visible_x > new_x || visible_y < new_y)) {
- new_x_scroll = state.xscroll;
- new_y_scroll = state.yscroll;
+ int new_x_scroll = state.xscroll;
+ int new_y_scroll = state.yscroll;
if (visible_x > new_x)
new_x_scroll = new_x - (state.visible.x1