mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 08:44:05 +01:00
Small efficiency change
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8a6941707a
commit
ad87d94e33
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user