From a252ff5ebe82407db5cff6c88ea47d3d159ec763 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 21 Jul 2024 22:20:13 -0400 Subject: [PATCH] freemyip: Invert condition to improve readability --- ddclient.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ddclient.in b/ddclient.in index d9d18d8..1a26c1d 100755 --- a/ddclient.in +++ b/ddclient.in @@ -6426,14 +6426,14 @@ sub nic_freemyip_update { next if !header_ok($h, $reply); my @reply = split /\n/, $reply; my $returned = pop(@reply); - if ($returned =~ /OK/) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("$h: good: IP address set to $ip"); - } else { + if ($returned !~ /OK/) { failed("$h: Server said: $returned"); + next; } + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("$h: good: IP address set to $ip"); } }