Skip to content
Snippets Groups Projects
Commit f63a6e38 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Peter Maydell
Browse files

chardev/baum: Replace magic values by X_MAX / Y_MAX definitions


Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX.

Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Message-id: 20220819153931.3147384-2-peter.maydell@linaro.org
parent 895a803c
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,9 @@
#define BUF_SIZE 256
#define X_MAX 84
#define Y_MAX 1
struct BaumChardev {
Chardev parent;
......@@ -244,11 +247,11 @@ static int baum_deferred_init(BaumChardev *baum)
brlapi_perror("baum: brlapi__getDisplaySize");
return 0;
}
if (baum->y > 1) {
baum->y = 1;
if (baum->y > Y_MAX) {
baum->y = Y_MAX;
}
if (baum->x > 84) {
baum->x = 84;
if (baum->x > X_MAX) {
baum->x = X_MAX;
}
con = qemu_console_lookup_by_index(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment