summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2010-11-29 01:41:04 -0600
committerKamil Kaminski <kamilkss@gmail.com>2010-11-29 01:41:04 -0600
commit010cad880b213dbdd1b69bfbaf0c3af1f44e474f (patch)
tree4035027951a922a5a3f947cab1ccd839feb2602a
parente8a9558a65ae43d3fdeecdebe59d4a1c66640435 (diff)
downloadtrees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.tar.gz
trees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.tar.bz2
trees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.zip
correct comments
-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;