diff options
author | Kyle K <kylek389@gmail.com> | 2010-11-29 01:41:04 -0600 |
---|---|---|
committer | Kamil Kaminski <kamilkss@gmail.com> | 2010-11-29 01:41:04 -0600 |
commit | 010cad880b213dbdd1b69bfbaf0c3af1f44e474f (patch) | |
tree | 4035027951a922a5a3f947cab1ccd839feb2602a | |
parent | e8a9558a65ae43d3fdeecdebe59d4a1c66640435 (diff) | |
download | trees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.tar.gz trees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.tar.bz2 trees-010cad880b213dbdd1b69bfbaf0c3af1f44e474f.zip |
correct comments
-rw-r--r-- | trees.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |