From 2534375cfd62bbf1dd18baa05c8d19e2ff834f91 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 7 Jun 2024 17:16:45 -0400 Subject: [PATCH] dyndns1: Move `else` case up a level for readability --- ddclient.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ddclient.in b/ddclient.in index 08cd151..c76022d 100755 --- a/ddclient.in +++ b/ddclient.in @@ -3758,13 +3758,12 @@ sub nic_dyndns1_update { warning("SENT: %s", $url) unless opt('verbose'); warning("REPLIED: %s", $reply); failed("updating %s: %s", $h, $title); - - } else { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); + next; } + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); } }