[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/52] ui/console: minor stylistic changes
From: |
marcandre . lureau |
Subject: |
[PULL 41/52] ui/console: minor stylistic changes |
Date: |
Mon, 4 Sep 2023 15:52:38 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-42-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 4ee3b77568..b1d375ecb4 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
- [PULL 31/52] ui/vc: move some text console initialization to qom handlers, (continued)
- [PULL 31/52] ui/vc: move some text console initialization to qom handlers, marcandre . lureau, 2023/09/04
- [PULL 32/52] ui/console: simplify getting active_console size, marcandre . lureau, 2023/09/04
- [PULL 35/52] ui/console: declare console types in console.h, marcandre . lureau, 2023/09/04
- [PULL 37/52] ui/console: rename vga_ functions with qemu_console_, marcandre . lureau, 2023/09/04
- [PULL 33/52] ui/console: remove need for g_width/g_height, marcandre . lureau, 2023/09/04
- [PULL 34/52] ui/vc: use common text console surface creation, marcandre . lureau, 2023/09/04
- [PULL 36/52] ui/console: use QEMU_PIXMAN_COLOR helpers, marcandre . lureau, 2023/09/04
- [PULL 38/52] ui/console: assert(surface) where appropriate, marcandre . lureau, 2023/09/04
- [PULL 39/52] ui/console: fold text_console_update_cursor_timer, marcandre . lureau, 2023/09/04
- [PULL 40/52] ui/vc: skip text console resize when possible, marcandre . lureau, 2023/09/04
- [PULL 41/52] ui/console: minor stylistic changes,
marcandre . lureau <=
- [PULL 43/52] ui/vc: do not parse VC-specific options in Spice and GTK, marcandre . lureau, 2023/09/04
- [PULL 42/52] ui/vc: move text console invalidate in helper, marcandre . lureau, 2023/09/04
- [PULL 44/52] ui/vc: change the argument for QemuTextConsole, marcandre . lureau, 2023/09/04
- [PULL 45/52] ui/spice-display: Avoid dynamic stack allocation, marcandre . lureau, 2023/09/04
- [PULL 46/52] ui/vnc-enc-hextile: Use static rather than dynamic length stack array, marcandre . lureau, 2023/09/04
- [PULL 47/52] ui/vnc-enc-tight: Avoid dynamic stack allocation, marcandre . lureau, 2023/09/04
- [PULL 48/52] ui/dbus: Properly dispose touch/mouse dbus objects, marcandre . lureau, 2023/09/04
- [PULL 49/52] ui/dbus: implement damage regions for GL, marcandre . lureau, 2023/09/04
- [PULL 50/52] ui/vdagent: call vdagent_disconnect() when agent connection is lost, marcandre . lureau, 2023/09/04
- [PULL 51/52] ui/vdagent: Unregister input handler of mouse during finalization, marcandre . lureau, 2023/09/04