aboutsummaryrefslogtreecommitdiff
path: root/2025-linuxdays/overflow.c
diff options
context:
space:
mode:
Diffstat (limited to '2025-linuxdays/overflow.c')
-rw-r--r--2025-linuxdays/overflow.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/2025-linuxdays/overflow.c b/2025-linuxdays/overflow.c
new file mode 100644
index 0000000..a21bf10
--- /dev/null
+++ b/2025-linuxdays/overflow.c
@@ -0,0 +1,11 @@
+#include <assert.h>
+#include <stdckdint.h>
+#include <stdint.h>
+
+int main(int argc, char *argv[]) {
+ int8_t add, sub, mul;
+ assert(ckd_add(&add, 50, 85));
+ assert(ckd_sub(&sub, 10, 150));
+ assert(ckd_mul(&mul, 68, 2));
+ return 0;
+}