Skip to content

Commit

Permalink
Fix sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Aug 7, 2024
1 parent be2b908 commit 7df5431
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stats-lib-funcs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ sub stats_network_netstat
}
my $rbytes = ($total_rx_after - $total_rx_before) / $interval;
my $tbytes = ($total_tx_after - $total_tx_before) / $interval;
$rbytes = $rbytes < 0 ? 0 : $rbytes;
$tbytes = $tbytes < 0 ? 0 : $tbytes;
my @rs = ($rbytes, $tbytes);
return \@rs;
}
Expand Down

0 comments on commit 7df5431

Please sign in to comment.