]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchthread: update comment about loop prevention
authorEric Wong <e@80x24.org>
Tue, 20 Dec 2016 23:42:35 +0000 (23:42 +0000)
committerEric Wong <e@80x24.org>
Wed, 21 Dec 2016 07:32:37 +0000 (07:32 +0000)
It definitely is necessary to prevent looping with the
%seen hash.

lib/PublicInbox/SearchThread.pm

index 601a84b0e263428618fafc5d74540a704f4e3bfa..fafe7d7bd4e04b87e4ce91a2183d45c932993ac6 100644 (file)
@@ -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};