mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +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.
This commit is contained in:
@@ -237,11 +237,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