summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/bench.h5
-rw-r--r--include/tinyff/result.h3
2 files changed, 6 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;
diff --git a/include/tinyff/result.h b/include/tinyff/result.h
index 3ed69b9..e77c9b4 100644
--- a/include/tinyff/result.h
+++ b/include/tinyff/result.h
@@ -14,6 +14,9 @@ typedef enum {
// File
FF_RESULT_ERROR_INVALID_FILE,
FF_RESULT_ERROR_READ_FILE_FAILURE,
+
+ // Generic
+ FF_RESULT_ERROR_OUT_OF_BOUNDS,
// Media specific