diff options
Diffstat (limited to 'c_litems.go')
-rw-r--r-- | c_litems.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c_litems.go b/c_litems.go index 86841ca..e3f26bb 100644 --- a/c_litems.go +++ b/c_litems.go @@ -169,7 +169,7 @@ func (litems *ItemsList) inc(jump int) { // returns the previous dir func (item *ItemsNode) prev_dir() *ItemsNode { - for ptr := item.prev; ptr != nil && ptr.prev != nil; ptr = ptr.prev { + for ptr := item.prev; ptr != nil; ptr = ptr.prev { if ptr.is_dir() == true { return ptr } @@ -179,7 +179,7 @@ func (item *ItemsNode) prev_dir() *ItemsNode { // returns the next dir func (item *ItemsNode) next_dir() *ItemsNode { - for ptr := item.next; ptr != nil && ptr.next != nil; ptr = ptr.next { + for ptr := item.next; ptr != nil; ptr = ptr.next { if ptr.is_dir() == true { return ptr } |