Invert the sense of the boolean result from 'error' to 'success'.
Signed-off-by: Richard Henderson <[email protected]>
---
tcg/region.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tcg/region.c b/tcg/region.c
index 5d4be1453b..2161d961d9 100644
--- a/tcg/region.c
+++ b/tcg/region.c
@@ -360,11 +360,11 @@ static void tcg_region_assign(TCGContext *s, size_t
curr_region)
static bool tcg_region_alloc__locked(TCGContext *s)
{
if (region.current == region.n) {
- return true;
+ return false;
}
tcg_region_assign(s, region.current);
region.current++;
- return false;
+ return true;
}
/*
@@ -373,17 +373,17 @@ static bool tcg_region_alloc__locked(TCGContext *s)
*/
bool tcg_region_alloc(TCGContext *s)
{
- bool err;
+ bool ok;
/* read the region size now; alloc__locked will overwrite it on success */
size_t size_full = s->code_gen_buffer_size;
qemu_mutex_lock(®ion.lock);
- err = tcg_region_alloc__locked(s);
- if (!err) {
+ ok = tcg_region_alloc__locked(s);
+ if (ok) {
region.agg_size_full += size_full - TCG_HIGHWATER;
}
qemu_mutex_unlock(®ion.lock);
- return err;
+ return !ok;
}
/*
@@ -392,8 +392,8 @@ bool tcg_region_alloc(TCGContext *s)
*/
static void tcg_region_initial_alloc__locked(TCGContext *s)
{
- bool err = tcg_region_alloc__locked(s);
- g_assert(!err);
+ bool ok = tcg_region_alloc__locked(s);
+ g_assert(ok);
}
void tcg_region_initial_alloc(TCGContext *s)
--
2.43.0