fuzz-catalog: use ASSERT_OK() and friends

Replace assert_se() with the typed ASSERT_* macros, so that a failing
assertion logs the values involved.
This commit is contained in:
Yu Watanabe committed 2026-11-05 03:21:37 +09:00
1 parent e9005a6ae4
commit 19916b2955
1 file changed
+3 -2
+3 -2
View File
@@ -6,6 +6,7 @@
#include "fd-util.h"
#include "fuzz.h"
#include "hashmap.h"
#include "tests.h"
#include "tmpfile-util.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
@@ -16,8 +17,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
fuzz_setup_logging();
fd = mkostemp_safe(name);
assert_se(fd >= 0);
assert_se(write(fd, data, size) == (ssize_t) size);
ASSERT_OK(fd);
ASSERT_EQ(write(fd, data, size), (ssize_t) size);
(void) catalog_import_file(&h, fd, name);