Global: addresses review comments generated by CI

This commit is contained in:
李通洲
2026-08-31 19:08:33 +08:00
parent 9c791b2c12
commit b9e4d04d65
11 changed files with 22 additions and 11 deletions
+1 -2
View File
@@ -29,13 +29,12 @@ const char* ffDetectProcesses(const FFProcessesOptions* options, FFProcessesResu
continue;
}
++result->processes;
if (proc_stat_has(stat, PSTAT_NUM_THREADS)) {
result->threads += proc_stat_num_threads(stat);
}
}
result->processes = (uint32_t) list->num_procs;
done:
if (list) {
proc_stat_list_free(list);
@@ -1,5 +1,5 @@
#include "processes.h"
const char* ffDetectProcesses([[maybe_unused]] FFProcessesResult* result) {
const char* ffDetectProcesses([[maybe_unused]] const FFProcessesOptions* options, [[maybe_unused]] FFProcessesResult* result) {
return "Not supported on this platform";
}
@@ -16,7 +16,8 @@
const char* detectTermux(FFTerminalFontResult* terminalFont) {
FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate();
// SharedPreferences XML: <string name="fontsize">14</string>, in px
if (ffParsePropFile(FF_TERMUX_PREF_PATH, "<string name=\"fontsize\">", &fontSize)) {
ffParsePropFile(FF_TERMUX_PREF_PATH, "<string name=\"fontsize\">", &fontSize);
if (fontSize.length > 0) {
ffStrbufAppendS(&fontSize, "px");
}
+3
View File
@@ -57,6 +57,9 @@ const char* ffTopGetProcessSnapshot(FFlist* snapshots, FFTopTypes) {
}
item->pid = pid;
item->cpuTime = 0;
item->memBytes = 0;
item->startTime = 0;
if (proc_stat_has(stat, PSTAT_TASK_BASIC)) {
const task_basic_info_t info = proc_stat_task_basic_info(stat);