[PATCH v2 2/3] tcg: Return success from tcg_region_alloc
Richard Henderson <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
Invert the sense of the boolean result from 'error' to 'success'. Signed-off-by: Richard Henderson <[email protected]> --- tcg/region.c | 2 +- tcg/tcg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/region.c b/tcg/region.c index 2161d961d9..8ee8c39c43 100644 --- a/tcg/region.c +++ b/tcg/region.c @@ -383,7 +383,7 @@ bool tcg_region_alloc(TCGContext *s) region.agg_size_full += size_full - TCG_HIGHWATER; } qemu_mutex_unlock(®ion.lock); - return !ok; + return ok; } /* diff --git a/tcg/tcg.c b/tcg/tcg.c index 1e77f2365a..af15c3d63e 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1835,7 +1835,7 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s) next = (void *)ROUND_UP((uintptr_t)(tb + 1), align); if (unlikely(next > s->code_gen_highwater)) { - if (tcg_region_alloc(s)) { + if (!tcg_region_alloc(s)) { return NULL; } goto retry; -- 2.43.0