From a8ccc2aa89c78108566c67b9e853797ea451f9c8 Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Fri, 24 May 2024 10:20:25 +0200 Subject: FIX GCC Warnings, added more checking to gcc flags --- modules/devices/battery.c | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/devices/battery.c') 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) { -- cgit v1.2.3