Skip to content

Commit

Permalink
Uptime (Linux): fix maybe uninitialized variable errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Nov 27, 2023
1 parent aca502e commit 167b130
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/detection/uptime/uptime_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 167b130

Please sign in to comment.