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