From 02c80fdf0958562c26c824a968bd911da299443c Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 26 Jul 2024 19:56:14 -0400 Subject: [PATCH] dslreports1: Move out `else` case to improve readability --- ddclient.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ddclient.in b/ddclient.in index b031a1a..08cd151 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4272,13 +4272,12 @@ sub nic_dslreports1_update { if ($return_code !~ /NOERROR/) { $config{$h}{'status'} = 'failed'; failed("$h: $reply"); - - } else { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("$h: $return_code: IP address set to $ip"); + next; } + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("$h: $return_code: IP address set to $ip"); } }