]> git.lizzy.rs Git - bspwm.git/commitdiff
Remove redundant tests
authorBastien Dejean <nihilhill@gmail.com>
Tue, 28 Jul 2020 16:28:44 +0000 (18:28 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Tue, 28 Jul 2020 16:28:44 +0000 (18:28 +0200)
src/tree.c

index c9f55bd3bea97f372395579075754e4178c49fb2..7ef784c4e6f5029ef7738b6096ba8bd8da854ccd 100644 (file)
@@ -851,7 +851,7 @@ node_t *next_node(node_t *n)
                return first_extrema(n->second_child);
        } else {
                node_t *p = n;
-               while (p != NULL && is_second_child(p)) {
+               while (is_second_child(p)) {
                        p = p->parent;
                }
                if (is_first_child(p)) {
@@ -872,7 +872,7 @@ node_t *prev_node(node_t *n)
                return second_extrema(n->first_child);
        } else {
                node_t *p = n;
-               while (p != NULL && is_first_child(p)) {
+               while (is_first_child(p)) {
                        p = p->parent;
                }
                if (is_second_child(p)) {