diff options
author | Bernhard Beschow <shentey@gmail.com> | 2024-04-30 17:06:38 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-08 19:43:23 +0200 |
commit | 014dbdac8798799d081abc9dff3e4876ca54f49e (patch) | |
tree | 691736a6d7140366d429716b02895ba59d183e63 /.editorconfig | |
parent | 8793d601f38b417d63820456582e1e22e51c2d34 (diff) | |
download | qemu-014dbdac8798799d081abc9dff3e4876ca54f49e.zip qemu-014dbdac8798799d081abc9dff3e4876ca54f49e.tar.gz qemu-014dbdac8798799d081abc9dff3e4876ca54f49e.tar.bz2 |
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 '.editorconfig')
0 files changed, 0 insertions, 0 deletions