From ac9f937c88892923120bbbc7204e33b452c589a4 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Tue, 25 Jun 2024 21:56:12 -0400 Subject: [PATCH] infomaniak: Delete unnecessary defined checks `undef` is falsy so there's no need to check whether the value is defined. --- ddclient.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index a5ce3fd..b8f8f34 100755 --- a/ddclient.in +++ b/ddclient.in @@ -8022,14 +8022,14 @@ sub nic_infomaniak_update { for my $url ($url1, $url2) { info("trying update with %s", $url); my $reply = geturl(proxy => opt('proxy'), url => $url); - if (!defined($reply) || !$reply) { + if (!$reply) { info("could not update %s using url %s, trying next one", $h, $url); next; } my ($status) = split / /, $reply, 1; my ($updated, $msg) = $statuses{$status} // (0, sprintf("Unknown reply from Infomaniak: %s", $reply)); - if (defined $updated && $updated) { + if ($updated) { info($msg); $config{$h}{"ipv$v"} = $ip; $config{$h}{'mtime'} = $now;