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)
|
if (pc)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
if (*skip-- <= 0)
|
if ((*skip)-- <= 0)
|
||||||
{
|
{
|
||||||
*buffer++ = pc;
|
*buffer++ = pc;
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*skip-- <= 0)
|
if ((*skip)-- <= 0)
|
||||||
{
|
{
|
||||||
*buffer++ = (void *)*fp;
|
*buffer++ = (void *)*fp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user