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:
Tom Eastep 2012-05-09 13:51:49 -07:00
parent 605ef6ef86
commit 820c965b72

View File

@ -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( $ ) {