From: Max Kellermann Date: Wed, 30 Dec 2009 20:28:50 +0000 (+0100) Subject: list_window: check for unchanged value in set_length() X-Git-Tag: release-0.16.1~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0f9d3cb7e7818e290fa32f70240f272c68666e2e;p=ncmpc.git list_window: check for unchanged value in set_length() Minor optimization. --- diff --git a/src/list_window.c b/src/list_window.c index 822805c..4fe984d 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -127,6 +127,9 @@ list_window_resize(struct list_window *lw, unsigned width, unsigned height) void list_window_set_length(struct list_window *lw, unsigned length) { + if (length == lw->length) + return; + lw->length = length; list_window_check_selected(lw);