[tin-dev] [PATCH] & question, filter.c:set_filter_scope()

Urs Janßen urs at tin.org
Tue Nov 21 14:23:24 CET 2023


cparser complained about an unread var (seems to be correct),
but why was that introduced sometime between tin-1.3beta-950824
and tinpre-1.4-19990927 (I don't have all the diffs or tar balls
anymore and the changelog is not detailed enough)? puzzeled.

=== modified file 'src/filter.c'
--- old/src/filter.c	2023-11-20 07:11:31 +0000
+++ new/src/filter.c	2023-11-21 13:13:12 +0000
@@ -2254,10 +2254,10 @@
 	struct t_group *group)
 {
 	int i, num, inscope;
-	struct t_filter *ptr, *prev;
+	struct t_filter *ptr;
 
 	inscope = num = group->glob_filter->num;
-	prev = ptr = group->glob_filter->filter;
+	ptr = group->glob_filter->filter;
 
 	for (i = 0; i < num; i++) {
 		ptr[i].inscope = TRUE;
@@ -2268,8 +2268,6 @@
 				inscope--;
 			}
 		}
-		if (i != 0 && ptr[i].inscope)
-			prev = prev->next = &ptr[i];
 	}
 	return inscope;
 }



More information about the tin-dev mailing list