aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-28 13:24:03 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-28 13:24:03 -0400
commit003a1e962aab767a030dab1d451fe0abc52bd32f (patch)
tree436d94818f9d203561e5838bcb9440dff1ecbd99
parente48d50df121d5852baa001fb7b7572dc47cb73a0 (diff)
replaced min macro with func
-rw-r--r--buf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/buf.c b/buf.c
index 67b7b26..b3150a4 100644
--- a/buf.c
+++ b/buf.c
@@ -3,7 +3,9 @@
#include <string.h>
#include "buf.h"
-#define min(a,b) (a<b) ? a : b
+int min(int a, int b) {
+ return ((a<b) ? a : b);
+}
struct buf_node{
char* text;