mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
dboxinfo: remove impossible case
The kernel does (and has always) report memory in
kib units, so there is no need to check this.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 75e14b90e5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-01-05 (Sun, 05 Jan 2014)
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
e6532a8b4f
commit
eb201a8975
@@ -227,11 +227,7 @@ void CDBoxInfoWidget::paint()
|
||||
char buf[80], a[80];
|
||||
long long unsigned v;
|
||||
while (fgets(buf, sizeof(buf), procmeminfo)) {
|
||||
char unit[10];
|
||||
*unit = 0;
|
||||
if ((3 == sscanf(buf, "%[^:]: %llu %s", a, &v, unit))
|
||||
|| (2 == sscanf(buf, "%[^:]: %llu", a, &v))) {
|
||||
if (*unit == 'k')
|
||||
if (2 == sscanf(buf, "%[^:]: %llu", a, &v)) {
|
||||
v <<= 10;
|
||||
if (!strcasecmp(a, "MemTotal"))
|
||||
memstat[MEMINFO_RAM][MEMINFO_TOTAL] += v;
|
||||
|
Reference in New Issue
Block a user