diff options
author | Tobin C. Harding <me@tobin.cc> | 2018-03-01 16:42:59 -0500 |
---|---|---|
committer | Tobin C. Harding <me@tobin.cc> | 2018-04-06 18:50:34 -0400 |
commit | 2306a67745ebdf3f98bc954248b74a3f1d57cdc2 (patch) | |
tree | 74e40740eb52d3dfc551f5b3f01e29dd6d360068 /scripts/leaking_addresses.pl | |
parent | 34827374492580b27c3cba29d493dab28c8c25d3 (diff) |
leaking_addresses: explicitly name variable used in regex
Currently sub routine may_leak_address() is checking regex against Perl
special variable $_ which is _fortunately_ being set correctly in a loop
before this sub routine is called. We already have declared a variable
to hold this value '$line' we should use it.
Use $line in regex match instead of implicit $_
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Diffstat (limited to 'scripts/leaking_addresses.pl')
-rwxr-xr-x | scripts/leaking_addresses.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl index ce3b9d5a5bbc..ba5f9709bced 100755 --- a/scripts/leaking_addresses.pl +++ b/scripts/leaking_addresses.pl | |||
@@ -363,7 +363,7 @@ sub may_leak_address | |||
363 | } | 363 | } |
364 | 364 | ||
365 | $address_re = get_address_re(); | 365 | $address_re = get_address_re(); |
366 | while (/($address_re)/g) { | 366 | while ($line =~ /($address_re)/g) { |
367 | if (!is_false_positive($1)) { | 367 | if (!is_false_positive($1)) { |
368 | return 1; | 368 | return 1; |
369 | } | 369 | } |