Skip to content

Commit

Permalink
Merge pull request ciao-project#1353 from dlespiau/20170713-get-memor…
Browse files Browse the repository at this point in the history
…y-info-error

deviceinfo: Return -1 when failing to open /proc/meminfo
  • Loading branch information
rbradford authored Jul 13, 2017
2 parents 60b4522 + 95ad150 commit 46c38c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deviceinfo/deviceinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func GetMemoryInfo() (total, available int) {

file, err := os.Open("/proc/meminfo")
if err != nil {
return
return -1, -1
}

total, available = getMemoryInfo(file)
Expand Down

0 comments on commit 46c38c2

Please sign in to comment.