From 44d56f5311f98a8955c67638e7520963dbd4d845 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 12 Jan 2025 00:14:03 -0300 Subject: Revamp lib, simplify it a bit and address some FIXMEs --- src/math.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/math.c') diff --git a/src/math.c b/src/math.c index 143a48d..90cea26 100644 --- a/src/math.c +++ b/src/math.c @@ -1,4 +1,4 @@ -#include "config.h" +#include #include #include @@ -9,6 +9,7 @@ #include "math.h" + int add_size(const size_t x, const size_t y, size_t *const out) { int rc = EOVERFLOW; @@ -42,5 +43,7 @@ out: return rc; } -extern inline size_t -max_size(const size_t x, const size_t y); +size_t +max_size(const size_t x, const size_t y) { + return x > y ? x : y; +} -- cgit v1.2.3