aboutsummaryrefslogtreecommitdiffstats
path: root/linux/Battery.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2018-04-11 01:26:28 +0200
committerDaniel Lange <DLange@git.local>2018-04-11 01:26:28 +0200
commit097fb9e4a3460fe1b6b3fc645ef97acb44946141 (patch)
tree58ba6c6459b926f555a539fab1ec01ff4e93d9ce /linux/Battery.c
parent2f3c2439d8d88cf7c1ecef0bcb2b33f747f3ed06 (diff)
parentc60f4cf3c1d91bd786db8e081699f420f44631f3 (diff)
downloaddebian_htop-097fb9e4a3460fe1b6b3fc645ef97acb44946141.tar.gz
debian_htop-097fb9e4a3460fe1b6b3fc645ef97acb44946141.tar.bz2
debian_htop-097fb9e4a3460fe1b6b3fc645ef97acb44946141.zip
Updated version 2.2.0 from 'upstream/2.2.0'
with Debian dir ed195b175f9cd34e0ba2b22dfecc727ab25e1463
Diffstat (limited to 'linux/Battery.c')
-rw-r--r--linux/Battery.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/linux/Battery.c b/linux/Battery.c
index 34a2401..aedacab 100644
--- a/linux/Battery.c
+++ b/linux/Battery.c
@@ -110,16 +110,13 @@ static ACPresence procAcpiCheck() {
char statePath[50];
xSnprintf((char *) statePath, sizeof statePath, "%s/%s/state", power_supplyPath, entryName);
FILE* file = fopen(statePath, "r");
-
if (!file) {
isOn = AC_ERROR;
continue;
}
-
char* line = String_readLine(file);
- if (!line) continue;
-
fclose(file);
+ if (!line) continue;
const char *isOnline = String_getToken(line, 2);
free(line);

© 2014-2024 Faster IT GmbH | imprint | privacy policy