Uptime: code refactor
This commit is contained in:
1 parent
39582471e8
commit
51bc06f60b
5 files changed
+19
-13
No files matched your search
@@ -7,11 +7,13 @@
|
||||
|
||||
void ffPrintUptime(FFinstance* instance)
|
||||
{
|
||||
uint64_t uptime = ffDetectUptime();
|
||||
uint64_t uptime;
|
||||
|
||||
if(uptime == 0)
|
||||
const char* error = ffDetectUptime(&uptime);
|
||||
|
||||
if(error)
|
||||
{
|
||||
ffPrintError(instance, FF_UPTIME_MODULE_NAME, 0, &instance->config.uptime, "Uptime could't be detected");
|
||||
ffPrintError(instance, FF_UPTIME_MODULE_NAME, 0, &instance->config.uptime, "%s", error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user