infomaniak: Invert condition to improve readability
This commit is contained in:
parent
29e86d9a91
commit
d2f0e042f4
1 changed files with 6 additions and 7 deletions
13
ddclient.in
13
ddclient.in
|
@ -8022,15 +8022,14 @@ sub nic_infomaniak_update {
|
|||
my ($status) = split / /, $reply, 1;
|
||||
my ($ok, $msg) =
|
||||
$statuses{$status} // (0, sprintf("Unknown reply from Infomaniak: %s", $reply));
|
||||
if ($ok) {
|
||||
success($msg);
|
||||
$config{$h}{"ipv$v"} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{"status-ipv$v"} = 'good';
|
||||
next;
|
||||
} else {
|
||||
if (!$ok) {
|
||||
failed($msg);
|
||||
next;
|
||||
}
|
||||
success($msg);
|
||||
$config{$h}{"ipv$v"} = $ip;
|
||||
$config{$h}{'mtime'} = $now;
|
||||
$config{$h}{"status-ipv$v"} = 'good';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue