porkbun: Simplify string equality check

This commit is contained in:
Richard Hansen 2024-07-23 01:51:03 -04:00
parent 0c31681d35
commit e1c8b26f7b

View file

@ -6823,8 +6823,7 @@ sub nic_porkbun_update {
if (ref($records) eq 'ARRAY' && defined $records->[0]->{'id'}) { if (ref($records) eq 'ARRAY' && defined $records->[0]->{'id'}) {
warning("updating %s: There are multiple applicable records. Only first record is used. Overwrite all with the same content.") warning("updating %s: There are multiple applicable records. Only first record is used. Overwrite all with the same content.")
if @$records > 1; if @$records > 1;
my $current_content = $records->[0]->{'content'}; if ($records->[0]{'content'} eq $ip) {
if ($current_content eq $ip) {
$config{$h}{"status-ipv$ipv"} = "good"; $config{$h}{"status-ipv$ipv"} = "good";
success("updating %s: skipped: ipv%s address was already set to %s.", $ipv, $h, $ip); success("updating %s: skipped: ipv%s address was already set to %s.", $ipv, $h, $ip);
next; next;