commit 4b78ac4d9f47e9094f569fcd9f316cb8a8481b80
Author:     Jochen Sprickerhof <[email protected]>
AuthorDate: Thu Apr 2 22:30:25 2020 +0200
Commit:     Jochen Sprickerhof <[email protected]>
CommitDate: Thu Apr 2 22:30:25 2020 +0200

    Fix style

diff --git a/scroll.c b/scroll.c
index 56e98ca..942750d 100644
--- a/scroll.c
+++ b/scroll.c
@@ -255,13 +255,12 @@ scrollup(void)
        struct line *bottom_old = bottom;
 
        /* account for last line */
-       if(bottom != NULL && TAILQ_PREV(bottom, tailhead, entries) == NULL)
+       if (bottom != NULL && TAILQ_PREV(bottom, tailhead, entries) == NULL)
                rows++;
 
        /* wind back bottom pointer by two pages */
-       for (; bottom != NULL &&
-              TAILQ_NEXT(bottom, entries) != NULL &&
-              rows <= ws.ws_row; rows++)
+       for (; bottom != NULL && TAILQ_NEXT(bottom, entries) != NULL &&
+           rows <= ws.ws_row; rows++)
                bottom = TAILQ_NEXT(bottom, entries);
 
        if (rows <= 0) {
@@ -290,9 +289,8 @@ scrolldown(char *buf, size_t size)
        int rows = ws.ws_row;
 
        /* print one page */
-       for (; rows > 0 &&
-              bottom != NULL &&
-              TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
+       for (; rows > 0 && bottom != NULL &&
+           TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
                bottom = TAILQ_PREV(bottom, tailhead, entries);
                write(STDOUT_FILENO, bottom->buf, bottom->size);
        }

Reply via email to