From 7790839eb08e495ef1d25850f1e66b2c2c8fbd16 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Thu, 16 Jun 2022 15:29:19 +0800 Subject: [PATCH] arch/backtrace: correct the skip counter Signed-off-by: chao.an --- arch/arm/src/common/arm_backtrace_fp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/common/arm_backtrace_fp.c b/arch/arm/src/common/arm_backtrace_fp.c index d1273882fd..1610334c72 100644 --- a/arch/arm/src/common/arm_backtrace_fp.c +++ b/arch/arm/src/common/arm_backtrace_fp.c @@ -55,7 +55,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit, if (pc) { i++; - if (*skip-- <= 0) + if ((*skip)-- <= 0) { *buffer++ = pc; } @@ -68,7 +68,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit, break; } - if (*skip-- <= 0) + if ((*skip)-- <= 0) { *buffer++ = (void *)*fp; }