diff --git a/ddclient.in b/ddclient.in index 53db6ed..7d244db 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1959,15 +1959,11 @@ sub init_config { delete($globals{$k}); next; } - # TODO: Isn't $globals{$k} guaranteed to be defined here? Otherwise $k wouldn't appear in - # %globals. - my $ovalue = $globals{$k} // $def->{'default'}; # _read_config already checked any value from the config file, so the purpose of this check # is to validate command-line options which were merged into %globals above. # TODO: Move this check to where the command-line options are actually processed. - if (!eval { $globals{$k} = check_value($ovalue, $def); 1; }) { - $ovalue //= '(not set)'; - warning("ignoring invalid variable value '$k=$ovalue': $@"); + if (!eval { $globals{$k} = check_value($globals{$k}, $def); 1; }) { + warning("ignoring invalid variable value '$k=$globals{$k}': $@"); if ($def->{'required'}) { # TODO: What's the point of this? The opt() function will fall back to the default # value if $globals{$k} is undefined.