Skip to content

Commit

Permalink
Use empty if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
monicasarbu committed May 5, 2017
1 parent 3d686c5 commit a18c1f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sigar_linux_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ func (self *Mem) Get() error {
}

kern := buffers + cached
if self.ActualFree == 0.0 {
if self.ActualFree > 0.0 {
// MemAvailable is in /proc/meminfo (kernel 3.14+)
} else {

self.ActualFree = self.Free + kern
}
self.Used = self.Total - self.ActualFree
Expand Down

0 comments on commit a18c1f1

Please sign in to comment.