summary refs log tree commit diff stats
path: root/hw/usb/dev-network.c
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2024-04-30 17:06:38 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-05-08 19:43:23 +0200
commit014dbdac8798799d081abc9dff3e4876ca54f49e (patch)
tree691736a6d7140366d429716b02895ba59d183e63 /hw/usb/dev-network.c
parent8793d601f38b417d63820456582e1e22e51c2d34 (diff)
downloadfocaccia-qemu-014dbdac8798799d081abc9dff3e4876ca54f49e.tar.gz
focaccia-qemu-014dbdac8798799d081abc9dff3e4876ca54f49e.zip
hw/i386/x86: Eliminate two if statements in x86_bios_rom_init()
Given that memory_region_set_readonly() is a no-op when the readonlyness is
already as requested it is possible to simplify the pattern

  if (condition) {
    foo(true);
  }

to

  foo(condition);

which is shorter and allows to see the invariant of the code more easily.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240430150643.111976-2-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'hw/usb/dev-network.c')
0 files changed, 0 insertions, 0 deletions