On 22/4/24 22:06, Bernhard Beschow wrote:
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 <shen...@gmail.com>
---
  hw/i386/x86.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to