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:
Stefan Seyfried
2014-01-05 18:53:23 +01:00
parent 8946c6ebf8
commit 5d157456ed

View File

@@ -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;