From 6ac5b41a2021192cd457a106acb33e1d45db50b9 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 23 Jul 2024 00:29:47 -0400 Subject: [PATCH] dondominio: Invert condition to improve readability --- ddclient.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ddclient.in b/ddclient.in index b720d1d..5393143 100755 --- a/ddclient.in +++ b/ddclient.in @@ -6532,14 +6532,14 @@ sub nic_dondominio_update { next if !header_ok($h, $reply); my @reply = split /\n/, $reply; my $returned = pop(@reply); - if ($returned =~ /OK|IP:$ip/) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("$h: IP address set to $ip"); - } else { + if ($returned !~ /OK|IP:$ip/) { failed("$h: Server said: $returned"); + next; } + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("$h: IP address set to $ip"); } }