Mercurial > hg > svcore
diff system/System.cpp @ 1363:39271c98cbdd 3.0-integration
Fix compiler warning, remove some debug out
author | Chris Cannam |
---|---|
date | Tue, 10 Jan 2017 16:56:48 +0000 |
parents | dca12b13d90b |
children | cc62d7862203 |
line wrap: on
line diff
--- a/system/System.cpp Tue Jan 10 14:18:34 2017 +0000 +++ b/system/System.cpp Tue Jan 10 16:56:48 2017 +0000 @@ -211,7 +211,9 @@ char buf[256]; while (!feof(meminfo)) { - fgets(buf, 256, meminfo); + if (!fgets(buf, 256, meminfo)) { + return; + } bool isMemFree = (strncmp(buf, "MemFree:", 8) == 0); bool isMemTotal = (!isMemFree && (strncmp(buf, "MemTotal:", 9) == 0)); if (isMemFree || isMemTotal) {