Simplify parse_assignments
This commit is contained in:
parent
4670955cb6
commit
71acd749a1
1 changed files with 5 additions and 9 deletions
14
ddclient.in
14
ddclient.in
|
@ -1045,17 +1045,13 @@ sub parse_assignments {
|
|||
while (1) {
|
||||
(my $name, my $value, $rest) = parse_assignment($rest);
|
||||
$rest =~ s/^[,\s]+//;
|
||||
if (defined $name) {
|
||||
if ($name eq 'fw-banlocal') {
|
||||
warning("'fw-banlocal' is deprecated and does nothing");
|
||||
next;
|
||||
}
|
||||
$variables{$name} = $value;
|
||||
} else {
|
||||
last;
|
||||
return ($rest, %variables) if !defined($name);
|
||||
if ($name eq 'fw-banlocal') {
|
||||
warning("'fw-banlocal' is deprecated and does nothing");
|
||||
next;
|
||||
}
|
||||
$variables{$name} = $value;
|
||||
}
|
||||
return ($rest, %variables);
|
||||
}
|
||||
sub parse_assignment {
|
||||
my ($rest) = @_;
|
||||
|
|
Loading…
Reference in a new issue