summaryrefslogtreecommitdiff
path: root/modules/devices/battery.c
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-05-24 10:20:25 +0200
committerhwspeedy <ns@bigbear.dk>2024-05-24 10:20:25 +0200
commita8ccc2aa89c78108566c67b9e853797ea451f9c8 (patch)
tree9499a58b04a6baf1ab4a0741f7a31d3ddbc0fbc8 /modules/devices/battery.c
parent25c366a8074af72c0811a960b947302bed036669 (diff)
FIX GCC Warnings, added more checking to gcc flags
Diffstat (limited to 'modules/devices/battery.c')
-rw-r--r--modules/devices/battery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/devices/battery.c b/modules/devices/battery.c
index 784a6cc5..7e7bad7b 100644
--- a/modules/devices/battery.c
+++ b/modules/devices/battery.c
@@ -315,6 +315,7 @@ __scan_battery_apm(void)
int c=fscanf(procapm, "%s %s %s 0x%x %s %s %d%%",
apm_drv_ver, apm_bios_ver, trash,
&ac_bat, trash, trash, &percentage);
+ if(c!=7) return;
fclose(procapm);
if (last_time == 0) {