From 2eb0398cf26767f2fd3453c87a63ff952912d0ee Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 23 Jul 2024 00:42:47 -0400 Subject: [PATCH] dnsmadeeasy: Invert condition to improve readability --- ddclient.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ddclient.in b/ddclient.in index 71ea8b6..2104d90 100755 --- a/ddclient.in +++ b/ddclient.in @@ -6603,15 +6603,15 @@ sub nic_dnsmadeeasy_update { next if !header_ok($h, $reply); my @reply = split /\n/, $reply; my $returned = pop(@reply); - if ($returned =~ qr/success/) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("$h: IP address set to $ip"); - } else { + if ($returned !~ qr/success/) { my $err = $messages{$returned} ? "$returned: $messages{$returned}" : $returned; failed("$h: Server said: $err"); + next; } + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("$h: IP address set to $ip"); } }