diff options
author | EuAndreh <eu@euandre.org> | 2025-01-12 00:14:03 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-01-12 14:27:57 -0300 |
commit | 44d56f5311f98a8955c67638e7520963dbd4d845 (patch) | |
tree | fbb2c58c79f1730ff62c83cef116fb5c0e035dfe /src/math.c | |
parent | Replace src/config.h with <s.h>; incorporate changes from other projects (diff) | |
download | pindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.gz pindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.xz |
Revamp lib, simplify it a bit and address some FIXMEs
Diffstat (limited to 'src/math.c')
-rw-r--r-- | src/math.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,4 @@ -#include "config.h" +#include <s.h> #include <assert.h> #include <errno.h> @@ -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; +} |