commit 9a6bf2a51049ad50a420483392c3dd7c8557dcaa from: Stefan Sperling date: Sun May 20 12:04:17 2018 UTC simplify tog log view scroll_down() commit - 16482c3bbedc26df5938c248bd58d6240a58d38d commit + 9a6bf2a51049ad50a420483392c3dd7c8557dcaa blob - 8c006114915a340b1e713f721df76ce714d2b538 blob + a0d98d2298f5a84183a354cb1c94c48d3a2cdce9 --- tog/tog.c +++ tog/tog.c @@ -515,12 +515,8 @@ scroll_down(struct commit_queue_entry **first_displaye pentry = TAILQ_NEXT(entry, entry); if (pentry == NULL) { err = fetch_parent_commit(&pentry, entry, repo); - if (err) + if (err || pentry == NULL) break; - if (pentry == NULL) { - *first_displayed_entry = entry; - return NULL; - } TAILQ_INSERT_TAIL(commits, pentry, entry); last_displayed_entry = pentry; } @@ -536,7 +532,8 @@ scroll_down(struct commit_queue_entry **first_displaye if (pentry) { TAILQ_INSERT_TAIL(commits, pentry, entry); last_displayed_entry = pentry; - } + } else + break; } } while (++nscrolled < maxscroll);