diff --git a/linux/Battery.c b/linux/Battery.c index 956a7397..4eab24dd 100644 --- a/linux/Battery.c +++ b/linux/Battery.c @@ -53,7 +53,7 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short if (!dirEntry) break; char* entryName = dirEntry->d_name; - if (String_startsWith(entryName, "BAT")) + if (!String_startsWith(entryName, "BAT")) continue; batteries[nBatteries] = xStrdup(entryName); nBatteries++; diff --git a/linux/Platform.c b/linux/Platform.c index 95e0000d..e6c1c08c 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -224,7 +224,7 @@ double Platform_setCPUValues(Meter* this, int cpu) { } void Platform_setMemoryValues(Meter* this) { - ProcessList* pl = (ProcessList*) this->pl; + ProcessList* pl = this->pl; LinuxProcessList* lpl = (LinuxProcessList*) this->pl; long int usedMem = pl->usedMem;