From ad87d94e33306550a1b1e4dde39a41475766129d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 26 Mar 2016 13:12:33 -0700 Subject: [PATCH] Small efficiency change Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index effde61fe..aa1d77c50 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1477,9 +1477,9 @@ sub hex_value( $ ) { # Strip off superfluous leading zeros from a hex number # sub normalize_hex( $ ) { - my $val = lc shift; + my $val = lc $_[0]; - $val =~ s/^0// while $val =~ /^0/ && length $val > 1; + $val =~ s/^0+/0/; $val; }