Skip to content

Commit

Permalink
stackcollapse-pmc.pl: fix uninitialized value warn on empty input
Browse files Browse the repository at this point in the history
.. and apparently reduce memory usage.
  • Loading branch information
mjguzik committed Aug 18, 2022
1 parent 810687f commit 15ddf29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stackcollapse-pmc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
my $prev_count;
my $prev_indent = -1;

foreach (<>) {
while (defined($_ = <>)) {
if (m/^( *)[0-9.]+% \[([0-9]+)\]\s*(\S+)/) {
my $indent = length($1);
if ($indent <= $prev_indent) {
Expand Down

0 comments on commit 15ddf29

Please sign in to comment.