console: do not resize buffer if size doesn't change

We shouldn't do anything if buffer_resize is called with the same size. This
also suppresses useless "buffer resized to XxY" debug messages.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann committed 2011-12-26 12:15:48 +01:00
1 parent cf21453430
commit d2e1f7d505
1 file changed
+3
+3
View File
@@ -345,6 +345,9 @@ int kmscon_buffer_resize(struct kmscon_buffer *buf, unsigned int x,
if (!y)
y = DEFAULT_HEIGHT;
if (buf->size_x == x && buf->size_y == y)
return 0;
/* Resize y size by adjusting the current buffer size */
if (y < buf->size_y) {
/*