From 7429c22201ed0b78a4bcd27ba3d29dcda2c6509c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 20 Oct 2020 22:29:16 +0200 Subject: [PATCH 1/2] Drop unnecessary cast --- linux/Platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From e12d48a661cee3482c038038be1eede5099fec48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 20 Oct 2020 22:30:13 +0200 Subject: [PATCH 2/2] Fix wrong strncmp replacement Fixes 4c66eb6d4cbd --- linux/Battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++;