From 0c0168a8f2530b37c6b63a340835f8141adbed27 Mon Sep 17 00:00:00 2001 From: pmf Date: Tue, 31 Jul 2007 19:46:15 +0000 Subject: [PATCH] don't decrease resource stack sizes when they are already zero git-svn-id: http://ltt.polymtl.ca/svn@2574 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 58ae0a2f..0a058c62 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -1736,7 +1736,7 @@ static void cpu_push_mode(LttvCPUState *cpust, LttvCPUMode state) static void cpu_pop_mode(LttvCPUState *cpust) { - if(cpust->mode_stack->len == 1) + if(cpust->mode_stack->len <= 1) cpu_set_base_mode(cpust, LTTV_CPU_UNKNOWN); else g_array_set_size(cpust->mode_stack, cpust->mode_stack->len - 1); @@ -1757,7 +1757,7 @@ static void bdev_push_mode(LttvBdevState *bdevst, LttvBdevMode state) static void bdev_pop_mode(LttvBdevState *bdevst) { - if(bdevst->mode_stack->len == 1) + if(bdevst->mode_stack->len <= 1) bdev_set_base_mode(bdevst, LTTV_BDEV_UNKNOWN); else g_array_set_size(bdevst->mode_stack, bdevst->mode_stack->len - 1); @@ -1777,7 +1777,7 @@ static void irq_push_mode(LttvIRQState *irqst, LttvIRQMode state) static void irq_pop_mode(LttvIRQState *irqst) { - if(irqst->mode_stack->len == 1) + if(irqst->mode_stack->len <= 1) irq_set_base_mode(irqst, LTTV_IRQ_UNKNOWN); else g_array_set_size(irqst->mode_stack, irqst->mode_stack->len - 1); -- 2.34.1