Skip to content

Commit

Permalink
Skip faulty negative values for memory
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Jun 29, 2018
1 parent c6f0148 commit f3b70ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/FusionInventory/Agent/Tools/SNMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ sub isInteger {
sub getCanonicalMemory {
my ($value) = @_;

# Don't try to analyse negative values
return if $value =~ /^-/;

if ($value =~ /^(\d+) KBytes$/) {
return int($1 / 1024);
} else {
Expand Down

0 comments on commit f3b70ba

Please sign in to comment.