From 93474f58d361b2ace4d5e51d5be4c220513da8d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 20 Dec 2016 23:42:35 +0000 Subject: searchthread: update comment about loop prevention It definitely is necessary to prevent looping with the %seen hash. --- lib/PublicInbox/SearchThread.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/SearchThread.pm') diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index 601a84b0..fafe7d7b 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -129,7 +129,7 @@ sub add_child { sub has_descendent { my ($self, $child) = @_; - my %seen; # loop prevention XXX may not be necessary + my %seen; # loop prevention while ($child) { return 1 if $self == $child || $seen{$child}++; $child = $child->{parent}; -- cgit v1.2.3-24-ge0c7