Browse Source

Fix style

Jochen Sprickerhof 5 years ago
parent
commit
4b78ac4d9f
1 changed files with 5 additions and 7 deletions
  1. 5 7
      scroll.c

+ 5 - 7
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);
 	}