Small efficiency change

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-26 13:12:33 -07:00
parent 8a6941707a
commit ad87d94e33

View File

@ -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;
}