summaryrefslogtreecommitdiffstats
path: root/trees.c
diff options
context:
space:
mode:
Diffstat (limited to 'trees.c')
-rw-r--r--trees.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trees.c b/trees.c
index 3a5599c..dd38e0c 100644
--- a/trees.c
+++ b/trees.c
@@ -6,7 +6,7 @@
#include "trees.h"
-/* addtree, adds a node containing token, at or below p */
+/* adds a node containing token, at or below p */
struct tnode *bintree_insert(struct tnode *p, char *t)
{
int cond;
@@ -20,9 +20,9 @@ struct tnode *bintree_insert(struct tnode *p, char *t)
}
else if ((cond = strcmp(t, p->text)) == 0)
p->count++;
- else if (cond < 0) /* go the the left subtree */
+ else if (cond < 0) /* go to the left subtree */
p->left = bintree_insert(p->left, t);
- else
+ else /* go to the right subtree */
p->right = bintree_insert(p->right, t);
return p;