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/computer/uptime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/computer/uptime.c') diff --git a/modules/computer/uptime.c b/modules/computer/uptime.c index f213442f..d12d1c2f 100644 --- a/modules/computer/uptime.c +++ b/modules/computer/uptime.c @@ -27,7 +27,7 @@ computer_get_uptime(void) if ((procuptime = fopen("/proc/uptime", "r")) != NULL) { int c=fscanf(procuptime, "%lu", &minutes); - ui->minutes = minutes / 60; + if(c) ui->minutes = minutes / 60; fclose(procuptime); } else { g_free(ui); -- cgit v1.2.3