]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchThread.pm
thread: avoid incrementing undefined value
[public-inbox.git] / lib / PublicInbox / SearchThread.pm
index dad783ef6cdc64b73a7e105750a1dc3d25873563..ba31f4322ae851c23a65fdfe6e96c0a42f28b601 100644 (file)
@@ -179,7 +179,7 @@ sub recurse_down {
        my %seen;
        my @q = ($self);
        while (my $cont = shift @q) {
-               $seen{$cont}++;
+               $seen{$cont} = 1;
                $callback->($cont);
 
                if (my $next = $cont->{next}) {
@@ -209,7 +209,7 @@ sub order_children {
                push @visited, $walk;
 
                # spot/break loops
-               $seen{$walk}++;
+               $seen{$walk} = 1;
 
                my $child = $walk->{child};
                if ($child && $seen{$child}) {