mirror of
https://github.com/webmin/webmin.git
synced 2026-06-21 20:00:26 +01:00
Fix some warnings
This commit is contained in:
@@ -1579,10 +1579,11 @@ return $chroot.$_[0];
|
||||
# Returns 2 if rndc is installed, 1 if ndc is instaled, or 0
|
||||
sub has_ndc
|
||||
{
|
||||
if ($config{'rndc_cmd'} =~ /^(\S+)/ && &has_command("$1") && $_[0] != 2) {
|
||||
my $mode = $_[0] || 0;
|
||||
if ($config{'rndc_cmd'} =~ /^(\S+)/ && &has_command("$1") && $mode != 2) {
|
||||
return 2;
|
||||
}
|
||||
if ($config{'ndc_cmd'} =~ /^(\S+)/ && &has_command("$1") && $_[0] != 1) {
|
||||
if ($config{'ndc_cmd'} =~ /^(\S+)/ && &has_command("$1") && $mode != 1) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -632,12 +632,12 @@ if ($addr =~ /^([\da-f]\.)+$ipv6revzone/i) {
|
||||
return $_[0];
|
||||
}
|
||||
|
||||
# net_to_ip6int(address, bits)
|
||||
# net_to_ip6int(address, [bits])
|
||||
# Converts an IPv6 address like 1234:dcba:: to a.b.c.d.4.3.2.1.ip6.int.
|
||||
sub net_to_ip6int
|
||||
{
|
||||
my $addr = lc($_[0]);
|
||||
my $n = $_[1] >> 2;
|
||||
my $n = $_[1] ? $_[1] >> 2 : 0;
|
||||
if (&check_ip6address($addr)) {
|
||||
$addr = reverse(split(/\:/, &expandall_ip6($addr)));
|
||||
$addr =~ s/(\w)/$1\./g;
|
||||
|
||||
Reference in New Issue
Block a user