mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 12:20:42 +01:00
Allow Shorewall::Config::in_hex() to accept an argument already expressed in hex.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
605ef6ef86
commit
820c965b72
@ -1030,7 +1030,9 @@ sub normalize_hex( $ ) {
|
||||
# Return the argument expressed in Hex
|
||||
#
|
||||
sub in_hex( $ ) {
|
||||
sprintf '0x%x', $_[0];
|
||||
my $value = $_[0];
|
||||
|
||||
$value =~ /^0x/ ? $value : sprintf '0x%x', $_[0];
|
||||
}
|
||||
|
||||
sub in_hex2( $ ) {
|
||||
|
Loading…
Reference in New Issue
Block a user