From e49c33df7d0a0194b829edccb152f9fe6fff1a23 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 15 Jul 2019 14:25:58 -0600 Subject: [PATCH] devel/mktodo.pl: Reorder else clauses This makes the trivial (short) case first, so it's easier to read (cherry picked from commit 9f3102880cda991067d28d7f59759bc4005f886a) Signed-off-by: Nicolas R --- dist/Devel-PPPort/devel/mktodo.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/Devel-PPPort/devel/mktodo.pl b/dist/Devel-PPPort/devel/mktodo.pl index db6e719..e3cd3a3 100644 --- a/dist/Devel-PPPort/devel/mktodo.pl +++ b/dist/Devel-PPPort/devel/mktodo.pl @@ -410,15 +410,16 @@ sub get_apicheck_symbol_map while (<$fh>) { next if /^#/; - if (defined $cur) { + + if (! defined $cur) { + /_DPPP_test_(\w+)/ and $cur = $1; + } + else { for my $sym (/\b([A-Za-z_]\w+)\b/g) { $symmap{$sym}{$cur}++; } undef $cur if /^}$/; } - else { - /_DPPP_test_(\w+)/ and $cur = $1; - } } return \%symmap; -- 1.8.3.1