From 3d88dea503ee197ed80e364958cb8e0c1c5d825c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?jean-fran=C3=A7ois=20Rameau?= Date: Tue, 2 Aug 2016 18:31:46 +0200 Subject: [PATCH] Desambiguate sprintf --- hardware/ups/apc/snmp/mode/batterystatus.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/ups/apc/snmp/mode/batterystatus.pm b/hardware/ups/apc/snmp/mode/batterystatus.pm index 5f46b54c2..021ccf08f 100644 --- a/hardware/ups/apc/snmp/mode/batterystatus.pm +++ b/hardware/ups/apc/snmp/mode/batterystatus.pm @@ -204,7 +204,7 @@ sub manage_selection { my $result = $options{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_upsBasicBattery}, instance => '0'); my $result2 = $options{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$oid_upsAdvBattery}, instance => '0'); - $result2->{upsAdvBatteryRunTimeRemaining} = sprintf "%.0f", $result2->{upsAdvBatteryRunTimeRemaining} / 100 / 60 if (defined($result2->{upsAdvBatteryRunTimeRemaining})); + $result2->{upsAdvBatteryRunTimeRemaining} = sprintf("%.0f", $result2->{upsAdvBatteryRunTimeRemaining} / 100 / 60) if (defined($result2->{upsAdvBatteryRunTimeRemaining})); foreach my $name (keys %{$mapping}) { $self->{global}->{$name} = $result->{$name};