From b481ed1e6eacf192f468685a62f4c8210f955dac Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 15 Jul 2017 22:24:09 +1000 Subject: [PATCH] Remove pointless NULL check in repaint_window() The function has already dereferenced the pointer and passing NULL to this function is just a bug. --- source/screen.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/screen.c b/source/screen.c index 52a4a13..5a388cb 100644 --- a/source/screen.c +++ b/source/screen.c @@ -1397,9 +1397,8 @@ int BX_is_cursor_in_display(Screen *screen) * If end_line is -1, then that means clear the display if any of it appears * after the end of the scrollback buffer. */ -void BX_repaint_window (Window *w, int start_line, int end_line) +void BX_repaint_window (Window *window, int start_line, int end_line) { - Window *window = (Window *)w; Display *curr_line; int count; int clean_display = 0; @@ -1407,9 +1406,6 @@ void BX_repaint_window (Window *w, int start_line, int end_line) if (dumb_mode || !window->visible) return; - if (!window) - window = current_window; - if (end_line == -1) { end_line = window->display_size;