filter: Switch from linked lists to arrays.
[paraslash.git] / grab_client.c
index a3db5c6..e348ea2 100644 (file)
@@ -176,7 +176,7 @@ void activate_grab_client(struct grab_client *gc, struct filter_node *fn)
  * activate_grab_client.
  */
 void activate_inactive_grab_clients(int slot_num, int audio_format_num,
-               struct list_head *filter_list)
+               struct filter_chain *fc)
 {
        struct grab_client *gc, *tmp;
        int i;
@@ -193,12 +193,10 @@ void activate_inactive_grab_clients(int slot_num, int audio_format_num,
                                num_filters(gc->audio_format_num)
                                < gc->conf->filter_num_arg)
                        continue;
-               i = 1;
-               list_for_each_entry(fn, filter_list, node) {
+               FOR_EACH_FILTER_NODE(fn, fc, i) {
                        if (gc->conf->filter_num_arg <= 0
-                               || i == gc->conf->filter_num_arg)
+                               || i == gc->conf->filter_num_arg + 1)
                                break;
-                       i++;
                }
                activate_grab_client(gc, fn);
        }