From b079a8643b8888fbf603ea014a56dd3355e3fad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 19 Jun 2025 22:41:30 +0800 Subject: [PATCH] Chore: code cleanups --- src/detection/gpu/gpu_bsd.c | 2 +- src/util/binary_linux.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/gpu/gpu_bsd.c b/src/detection/gpu/gpu_bsd.c index 6f5a9c9a0..20556b66f 100644 --- a/src/detection/gpu/gpu_bsd.c +++ b/src/detection/gpu/gpu_bsd.c @@ -147,7 +147,7 @@ static const char* detectByDrm(const FFGPUOptions* options, FFlist* gpus) static const char* detectByPci(const FFGPUOptions* options, FFlist* gpus) { - FF_AUTO_CLOSE_FD int fd = open("/dev/pci", O_RDONLY | O_CLOEXEC, 0); + FF_AUTO_CLOSE_FD int fd = open("/dev/pci", O_RDONLY | O_CLOEXEC); if (fd < 0) return "open(\"/dev/pci\", O_RDONLY | O_CLOEXEC, 0) failed"; diff --git a/src/util/binary_linux.c b/src/util/binary_linux.c index 725ccb60e..a723243cd 100644 --- a/src/util/binary_linux.c +++ b/src/util/binary_linux.c @@ -63,7 +63,7 @@ const char* ffBinaryExtractStrings(const char* elfFile, bool (*cb)(const char* s return "load libelf failed"; // Open the ELF file - FF_AUTO_CLOSE_FD int fd = open(elfFile, O_RDONLY | O_CLOEXEC, 0); + FF_AUTO_CLOSE_FD int fd = open(elfFile, O_RDONLY | O_CLOEXEC); if (fd < 0) return "open() failed"; Elf* elf = elfData.ffelf_begin(fd, ELF_C_READ, NULL);