From 167b130011c2916be8d9e2295761d40d76dd6665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 27 Nov 2023 20:52:14 +0800 Subject: [PATCH] Uptime (Linux): fix maybe uninitialized variable errors --- src/detection/uptime/uptime_linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/detection/uptime/uptime_linux.c b/src/detection/uptime/uptime_linux.c index 958a47fe75..7c0a46161a 100644 --- a/src/detection/uptime/uptime_linux.c +++ b/src/detection/uptime/uptime_linux.c @@ -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;