mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Uptime (Linux): fix maybe uninitialized variable errors
This commit is contained in:
@@ -13,6 +13,8 @@ const char* ffDetectUptime(FFUptimeResult* result)
|
||||
double sec;
|
||||
if (fscanf(uptime, "%lf", &sec) > 0)
|
||||
result->uptime = (uint64_t) (sec * 1000);
|
||||
else
|
||||
return "fscanf(\"%lf\", &sec) failed";
|
||||
|
||||
result->bootTime = ffTimeGetNow() + result->uptime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user