[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 41/67] ui/console: minor stylistic changes
From: |
marcandre . lureau |
Subject: |
[PATCH 41/67] ui/console: minor stylistic changes |
Date: |
Wed, 30 Aug 2023 13:38:15 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
ui/console.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/ui/console.c b/ui/console.c
index 6163f73640..c0b60284b2 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -427,20 +427,18 @@ static void text_console_resize(QemuTextConsole *t)
t->width = w;
t->height = h;
- w1 = last_width;
- if (t->width < w1)
- w1 = t->width;
+ w1 = MIN(t->width, last_width);
cells = g_new(TextCell, t->width * t->total_height + 1);
- for(y = 0; y < t->total_height; y++) {
+ for (y = 0; y < t->total_height; y++) {
c = &cells[y * t->width];
if (w1 > 0) {
c1 = &t->cells[y * last_width];
- for(x = 0; x < w1; x++) {
+ for (x = 0; x < w1; x++) {
*c++ = *c1++;
}
}
- for(x = w1; x < t->width; x++) {
+ for (x = w1; x < t->width; x++) {
c->ch = ' ';
c->t_attrib = TEXT_ATTRIBUTES_DEFAULT;
c++;
--
2.41.0
- [PATCH 38/67] ui/console: assert(surface) where appropriate, (continued)
- [PATCH 38/67] ui/console: assert(surface) where appropriate, marcandre . lureau, 2023/08/30
- [PATCH 36/67] ui/console: use QEMU_PIXMAN_COLOR helpers, marcandre . lureau, 2023/08/30
- [PATCH 39/67] ui/console: fold text_console_update_cursor_timer, marcandre . lureau, 2023/08/30
- [PATCH 40/67] ui/vc: skip text console resize when possible, marcandre . lureau, 2023/08/30
- [PATCH 37/67] ui/console: rename vga_ functions → qemu_console_, marcandre . lureau, 2023/08/30
- [PATCH 41/67] ui/console: minor stylistic changes,
marcandre . lureau <=
- [PATCH 42/67] ui/vc: move text console invalidate in helper, marcandre . lureau, 2023/08/30
- [PATCH 43/67] ui/vc: do not parse VC-specific options in Spice and GTK, marcandre . lureau, 2023/08/30
- [PATCH 45/67] ui/vc: remove kby_put_keysym() and update function calls, marcandre . lureau, 2023/08/30
- [PATCH 46/67] ui/vc: rename kbd_put → qemu_text_console functions, marcandre . lureau, 2023/08/30
- [PATCH 44/67] ui/vc: change the argument for QemuTextConsole, marcandre . lureau, 2023/08/30
- [PATCH 48/67] ui/vc: preliminary QemuTextConsole changes before split, marcandre . lureau, 2023/08/30
- [PATCH 47/67] ui/console: remove redundant format field, marcandre . lureau, 2023/08/30
- [PATCH 50/67] ui/console: move DisplaySurface to its own header, marcandre . lureau, 2023/08/30