vga and cirrus_vga: substitute switch for equivalent assigntment

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Juan Quintela 2009-08-31 16:07:23 +02:00 committed by Anthony Liguori
parent 957c9db562
commit a46007a021
2 changed files with 2 additions and 27 deletions

View File

@ -2874,20 +2874,7 @@ static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
return;
}
switch (s->cr_index) {
case 0x01: /* horizontal display end */
case 0x07:
case 0x09:
case 0x0c:
case 0x0d:
case 0x12: /* vertical display end */
s->cr[s->cr_index] = val;
break;
default:
s->cr[s->cr_index] = val;
break;
}
s->cr[s->cr_index] = val;
switch(s->cr_index) {
case 0x00:

View File

@ -488,19 +488,7 @@ void vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)
s->cr[7] = (s->cr[7] & ~0x10) | (val & 0x10);
return;
}
switch(s->cr_index) {
case 0x01: /* horizontal display end */
case 0x07:
case 0x09:
case 0x0c:
case 0x0d:
case 0x12: /* vertical display end */
s->cr[s->cr_index] = val;
break;
default:
s->cr[s->cr_index] = val;
break;
}
s->cr[s->cr_index] = val;
switch(s->cr_index) {
case 0x00: