Code

Use foreach_view for the stop loading action
authorJonas Fonseca <fonseca@diku.dk>
Mon, 12 Apr 2010 02:47:14 +0000 (22:47 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Thu, 15 Apr 2010 11:20:18 +0000 (07:20 -0400)
tig.c

diff --git a/tig.c b/tig.c
index 9b50261ab5c8738d17ea3ed239dce1a5bcf86b06..fa0c806fffe9a76f93426ed0fbacf236029e0c97 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3737,8 +3737,7 @@ view_driver(struct view *view, enum request request)
                break;
 
        case REQ_STOP_LOADING:
-               for (i = 0; i < ARRAY_SIZE(views); i++) {
-                       view = &views[i];
+               foreach_view(view, i) {
                        if (view->pipe)
                                report("Stopped loading the %s view", view->name),
                        end_update(view, TRUE);