diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 20:52:05 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-02-22 20:52:05 +1100 |
| commit | fa59b89a30f5ec834f6974edb236c7aba05ee229 (patch) | |
| tree | 1a710987f931cf9da90da3551aaeb0000140f671 /bench | |
| parent | 1a05b6e111fa143ecd67491e548e5fc1db74f30e (diff) | |
feat(bench): Check if marker size is out of bounds
Diffstat (limited to 'bench')
| -rw-r--r-- | bench/bench.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bench/bench.h b/bench/bench.h index ac414ce..b999490 100644 --- a/bench/bench.h +++ b/bench/bench.h @@ -2,6 +2,7 @@ #define TINYFF_BENCH_H_ #include <time.h> +#include <tinyff/result.h> #define FF_BENCH_MAX_MARKERS 32 @@ -37,8 +38,8 @@ static inline void ff_bench_end(ff_bench *b) { b->_end = clock(); } -static inline void ff_bench_mark(ff_bench *b, const char *label) { - if (b->_mcount >= FF_BENCH_MAX_MARKERS) return; +static inline ff_result ff_bench_mark(ff_bench *b, const char *label) { + if (b->_mcount >= FF_BENCH_MAX_MARKERS) return FF_RESULT_ERROR_OUT_OF_BOUNDS; ff_bench_marker m; m.label = label; |
