diff --git a/include/tr/tree_macros.h b/include/tr/tree_macros.h index 0cfee33..540ce58 100644 --- a/include/tr/tree_macros.h +++ b/include/tr/tree_macros.h @@ -116,12 +116,11 @@ typedef enum {rbBlack=1, rbRed=2} TR_rbColor; while(1) { \ (found) = (comp)((node)->data, (search)); \ if (0 != (found)) { \ - if (! ((node)->left || (node)->right)) { \ - break; \ - } \ if (0 < (found)) { \ + if (! (node)->left) break; \ (node) = (node)->left; \ } else { \ + if (! (node)->right) break; \ (node) = (node)->right; \ } \ } else { \