Chore: run clang-format

```bash
find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i
```
This commit is contained in:
李通洲
2026-03-29 09:28:49 +08:00
parent cdd4cee968
commit e0eba8ce21
690 changed files with 28093 additions and 30062 deletions
+8 -9
View File
@@ -3,22 +3,21 @@
#include "common/io.h"
#include "common/stringUtils.h"
const char* ffDetectProcesses(uint32_t* result)
{
const char* ffDetectProcesses(uint32_t* result) {
FF_AUTO_CLOSE_DIR DIR* dir = opendir("/proc");
if(dir == NULL)
if (dir == NULL) {
return "opendir(\"/proc\") failed";
}
uint32_t num = 0;
struct dirent* entry;
while ((entry = readdir(dir)) != NULL)
{
while ((entry = readdir(dir)) != NULL) {
if (
#ifdef _DIRENT_HAVE_D_TYPE
(entry->d_type == DT_DIR || entry->d_type == DT_UNKNOWN) &&
#endif
ffCharIsDigit(entry->d_name[0]))
#ifdef _DIRENT_HAVE_D_TYPE
(entry->d_type == DT_DIR || entry->d_type == DT_UNKNOWN) &&
#endif
ffCharIsDigit(entry->d_name[0]))
++num;
}