arch/backtrace: correct the skip counter
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
b33a709213
commit
7790839eb0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue