arm: fix backtrace busyloop
@@ -52,14 +52,13 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
if (pc)
{
- i++;
if ((*skip)-- <= 0)
{
- *buffer++ = pc;
+ buffer[i++] = pc;
}
}
- for (; i < size; fp = (uintptr_t *)*(fp - 1), i++)
+ for (; i < size; fp = (uintptr_t *)*(fp - 1))
{
if (fp > limit || fp < base || *fp == 0)
{
@@ -68,7 +67,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
if ((*skip)-- <= 0)
{
- *buffer++ = (void *)*fp;
+ buffer[i++] = (void *)*fp;
}
}
