From fbd7167b94ab6108b12309a404c6df9e9489e8d7 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 22 Aug 2024 02:56:50 -0400 Subject: [PATCH] read_recap: Fix iteration over hosts --- ddclient.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ddclient.in b/ddclient.in index 03e6735..3bf4a7a 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1633,11 +1633,8 @@ sub read_recap { %opt = (); $saved_recap = _read_config(\%recap, $globals, "##\\s*$program-$version\\s*", $file); %opt = %saved; - # TODO: Why is this iterating over `keys(%recap)`? Shouldn't it iterate over `keys(%config)` - # instead? for my $h (keys(%recap)) { - # TODO: `$recap{$h}` is guaranteed to exist because we're iterating over `keys(%recap)`. - next if !exists($recap{$h}); + next if !exists($config{$h}); # Only status variables are copied from `%recap` into `%config` because the recap should # not change the configuration. See the documenting comments for `%recap`. # TODO: Hard-coding this list impairs readability and maintainability. In particular,