aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-28 13:24:38 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-28 13:24:38 -0400
commitb9dc26454d9ab57a6bbd36762fae57783de908ac (patch)
tree7ae6a9879d3325484a646bc585e4524054f7fa6f
parent9addd39acd0e53656ccedf4fb5380c8df7845a8f (diff)
replaced max(a,b) macro with func
-rw-r--r--strbst.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/strbst.c b/strbst.c
index 16c2e61..59d637e 100644
--- a/strbst.c
+++ b/strbst.c
@@ -7,8 +7,9 @@
strbst defines strbst with one member: strbstnode->head.
strbstnode has left, right, data, ind, and ht for avl balancing
*/
-#define max(a,b) ((a > b) ? a : b)
-#define min(a,b) ((a < b) ? a : b)
+int max(int a, int b) {
+ return ( (a < b) ? a : b);
+}
typedef char height;